Message ID | 1551891681-5606-1-git-send-email-hzhou8@ebay.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,v2] ovsdb-idl: Fix memory leak of idl->remote. | expand |
On Wed, Mar 6, 2019 at 7:23 PM Han Zhou <zhouhan@gmail.com> wrote: > From: Han Zhou <hzhou8@ebay.com> > > Reported by Address Sanitizer. > > Fixes: 5e07b8f93f03 ("ovsdb-idl: New function > ovsdb_idl_create_unconnected().") > Signed-off-by: Han Zhou <hzhou8@ebay.com> > --- > > Notes: > v1->v2: address comments from David Marchand. > > lib/ovsdb-idl.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c > index 8cfb201..ed2b30a 100644 > --- a/lib/ovsdb-idl.c > +++ b/lib/ovsdb-idl.c > @@ -571,6 +571,7 @@ ovsdb_idl_destroy(struct ovsdb_idl *idl) > ovsdb_idl_db_destroy(&idl->server); > ovsdb_idl_db_destroy(&idl->data); > json_destroy(idl->request_id); > + free(idl->remote); > free(idl); > } > } > Reviewed-by: David Marchand <david.marchand@redhat.com>
On Wed, Mar 06, 2019 at 09:01:21AM -0800, Han Zhou wrote: > From: Han Zhou <hzhou8@ebay.com> > > Reported by Address Sanitizer. > > Fixes: 5e07b8f93f03 ("ovsdb-idl: New function ovsdb_idl_create_unconnected().") > Signed-off-by: Han Zhou <hzhou8@ebay.com> > --- > > Notes: > v1->v2: address comments from David Marchand. Thanks, applied to branch-2.11
diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 8cfb201..ed2b30a 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -571,6 +571,7 @@ ovsdb_idl_destroy(struct ovsdb_idl *idl) ovsdb_idl_db_destroy(&idl->server); ovsdb_idl_db_destroy(&idl->data); json_destroy(idl->request_id); + free(idl->remote); free(idl); } }