[ovs-dev] [PATCH] ofproto-dpif: Fix minor memory leak when creating dpif_backers.

Ethan Jackson ethan at nicira.com
Tue Jan 22 23:44:21 UTC 2013


Found by inspection.

Signed-off-by: Ethan Jackson <ethan at nicira.com>
---
 ofproto/ofproto-dpif.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index b37b482..2c216fe 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -1022,6 +1022,7 @@ open_dpif_backer(const char *type, struct dpif_backer **backerp)
     if (error) {
         VLOG_ERR("failed to open datapath of type %s: %s", type,
                  strerror(error));
+        free(backer);
         return error;
     }
 
-- 
1.7.9.5




More information about the dev mailing list