[ovs-dev] [PATCH] ovsdb-idl: Fix memory leak of idl->remote.

Han Zhou zhouhan at gmail.com
Wed Mar 6 01:46:36 UTC 2019


From: Han Zhou <hzhou8 at ebay.com>

Reported by Address Sanitizer.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
---
 lib/ovsdb-idl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 8cfb201..554bf76 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -571,6 +571,9 @@ ovsdb_idl_destroy(struct ovsdb_idl *idl)
         ovsdb_idl_db_destroy(&idl->server);
         ovsdb_idl_db_destroy(&idl->data);
         json_destroy(idl->request_id);
+        if (idl->remote) {
+            free(idl->remote);
+        }
         free(idl);
     }
 }
-- 
2.1.0



More information about the dev mailing list