On Sun, Jun 05, 2016 at 07:37:35AM -0700, William Tu wrote: > Calling ovsdb_idl_set_remote() might overwrite the 'idl->session'. The patch > fixes them by freeing 'idl->session' before it is overwritten. > > Testcast ovn-controller - ovn-bridge-mappings reports two definitely losts in: > xmalloc (util.c:112) > jsonrpc_session_open (jsonrpc.c:784) > ovsdb_idl_create (ovsdb-idl.c:246) > main (ovn-controller.c:384) > and, > xmalloc (util.c:112) > jsonrpc_session_open (jsonrpc.c:784) > ovsdb_idl_set_remote (ovsdb-idl.c:289) > main (ovn-controller.c:409) > > Signed-off-by: William Tu <u9012...@gmail.com> > --- > lib/ovsdb-idl.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c > index 2b372cb..15421ac 100644 > --- a/lib/ovsdb-idl.c > +++ b/lib/ovsdb-idl.c > @@ -286,6 +286,9 @@ ovsdb_idl_set_remote(struct ovsdb_idl *idl, const char > *remote, > { > if (idl) { > ovs_assert(!idl->txn); > + if (idl->session) { > + jsonrpc_session_close(idl->session); > + }
Thanks, I applied this to master. I removed the "if" because jsonrpc_session_close() is a no-op for null pointers. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev