From: Ben Pfaff Date: Wed, 15 Aug 2012 22:19:18 +0000 (-0700) Subject: dpif-netdev: Fix memory leak. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2477924e34a9a0827a0ac0790f442d94f254117c;p=openvswitch dpif-netdev: Fix memory leak. upcall->packet is allocated with malloc(), via ofpbuf_new(), but nothing ever frees it. Found by valgrind. CC: Ed Maste Signed-off-by: Ben Pfaff --- diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 7fa27208..3d01b17a 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -966,6 +966,7 @@ dpif_netdev_recv(struct dpif *dpif, struct dpif_upcall *upcall, ofpbuf_uninit(buf); *buf = *upcall->packet; + free(upcall->packet); return 0; } else {