From: Ben Pfaff Date: Wed, 15 Aug 2012 22:19:18 +0000 (-0700) Subject: dpif-netdev: Fix memory leak. X-Git-Tag: sliver-openvswitch-1.8.90-0~48^2~42 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=2477924e34a9a0827a0ac0790f442d94f254117c 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 7fa272084..3d01b17aa 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 {