[ovs-dev] [PATCH 1/1] ovs-ofctl: fix memory leak in open_vconn__() function

Damijan Skvarc damjan.skvarc at gmail.com
Tue Sep 24 13:41:22 UTC 2019


Signed-off-by: Damijan Skvarc <damjan.skvarc at gmail.com>
---
 utilities/ovs-ofctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 06289d2..b2350e0 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -590,6 +590,8 @@ open_vconn__(const char *name, enum open_target target,
     } else if (!open_vconn_socket(socket_name, vconnp)) {
         /* Fall Through. */
     } else {
+        free(bridge_path);
+        free(socket_name);
         ovs_fatal(0, "%s is not a bridge or a socket", name);
     }
 
-- 
2.7.4



More information about the dev mailing list