From: Ben Pfaff Date: Tue, 7 Jun 2011 20:15:46 +0000 (-0700) Subject: dpif-linux: Fix memory and file descriptor leak in dpif_linux_close(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3c110b648236b9772bf5e5cad2540bb48d7a90f;p=openvswitch dpif-linux: Fix memory and file descriptor leak in dpif_linux_close(). Found with valgrind. --- diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index 586de489..0f6a1405 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -289,6 +289,7 @@ static void dpif_linux_close(struct dpif *dpif_) { struct dpif_linux *dpif = dpif_linux_cast(dpif_); + nl_sock_destroy(dpif->mc_sock); rtnetlink_link_notifier_unregister(&dpif->port_notifier); sset_destroy(&dpif->changed_ports); free(dpif->lru_bitmap);