mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
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>
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user