[ovs-dev] [PATCH] ofproto: Don't leak descriptions when destroying an ofproto

Justin Pettit jpettit at nicira.com
Fri Jan 22 22:11:17 UTC 2010


Reported-by: Ben Pfaff <blp at nicira.com>
---
 ofproto/ofproto.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 83867e8..b9936fd 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -744,6 +744,12 @@ ofproto_destroy(struct ofproto *p)
 
     mac_learning_destroy(p->ml);
 
+    free(p->manufacturer);
+    free(p->hardware);
+    free(p->software);
+    free(p->serial);
+    free(p->dp_desc);
+
     free(p);
 }
 
-- 
1.6.5.5





More information about the dev mailing list