aboutsummaryrefslogtreecommitdiff
path: root/lib/dpif-netdev.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-08-15 15:19:18 -0700
committerBen Pfaff <blp@nicira.com>2012-08-16 09:47:09 -0700
commit2477924e34a9a0827a0ac0790f442d94f254117c (patch)
tree995d4c166ebd717f9cf9cf142f455460308f3548 /lib/dpif-netdev.c
parent4e090bc7bfe6993f568701d3fdf9c2621babd03c (diff)
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 <emaste@freebsd.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/dpif-netdev.c')
-rw-r--r--lib/dpif-netdev.c1
1 files changed, 1 insertions, 0 deletions
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 {