[ovs-dev] [PATCH] dpif-netdev: Fix leaked port and port->rxq in error path

Thomas Graf tgraf at noironetworks.com
Tue Aug 26 16:36:08 UTC 2014


Signed-off-by: Thomas Graf <tgraf at noironetworks.com>
---
 lib/dpif-netdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 7401293..c7a1242 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -669,6 +669,8 @@ do_add_port(struct dp_netdev *dp, const char *devname, const char *type,
             VLOG_ERR("%s: cannot receive packets on this network device (%s)",
                      devname, ovs_strerror(errno));
             netdev_close(netdev);
+            free(port->rxq);
+            free(port);
             return error;
         }
     }
-- 
1.9.3




More information about the dev mailing list