[ovs-dev] [PATCH] ovn-controller: Fix memory leak reported byvalgrind.
Ryan Moats
rmoats at us.ibm.com
Thu Jun 9 02:32:42 UTC 2016
"dev" <dev-bounces at openvswitch.org> wrote on 06/05/2016 09:37:35 AM:
> From: William Tu <u9012063 at gmail.com>
> To: dev at openvswitch.org
> Date: 06/05/2016 09:37 AM
> Subject: [ovs-dev] [PATCH] ovn-controller: Fix memory leak reported
> by valgrind.
> Sent by: "dev" <dev-bounces at openvswitch.org>
>
> 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 definitelylosts
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 <u9012063 at gmail.com>
Looked at this by inspection and it makes sense. I also checked
ovsdb/jsonrpc-server.c but I don't think that usage leaks - William, did
you
also check that?
Acked-by: Ryan Moats <rmoats at us.ibm.com>
More information about the dev
mailing list