[ovs-dev,1/1] ovs-ofctl: fix memory leak in open_vconn__() function
diff mbox series

Message ID 1569332482-11931-1-git-send-email-damjan.skvarc@gmail.com
State New
Headers show
Series
  • [ovs-dev,1/1] ovs-ofctl: fix memory leak in open_vconn__() function
Related show

Commit Message

Damijan Skvarc Sept. 24, 2019, 1:41 p.m. UTC
Signed-off-by: Damijan Skvarc <damjan.skvarc@gmail.com>
---
 utilities/ovs-ofctl.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ben Pfaff Sept. 24, 2019, 5:28 p.m. UTC | #1
On Tue, Sep 24, 2019 at 03:41:22PM +0200, Damijan Skvarc wrote:
> Signed-off-by: Damijan Skvarc <damjan.skvarc@gmail.com>

Thanks.  I applied this to master.

There's another memory leak here (in the run()) call, but it's even less
worth fixing than this one.

Patch
diff mbox series

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