[ovs-dev,v2] ovsdb-idl: Fix memory leak of idl->remote.
diff mbox series

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.
Related show

Commit Message

Han Zhou March 6, 2019, 5:01 p.m. UTC
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(+)

Comments

David Marchand March 7, 2019, 4:17 p.m. UTC | #1
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>
Ben Pfaff March 7, 2019, 7:21 p.m. UTC | #2
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

Patch
diff mbox series

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);
     }
 }