dpif-linux: Fix memory and file descriptor leak in dpif_linux_close().
authorBen Pfaff <blp@nicira.com>
Tue, 7 Jun 2011 20:15:46 +0000 (13:15 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 7 Jun 2011 20:20:35 +0000 (13:20 -0700)
Found with valgrind.

lib/dpif-linux.c

index 586de48..0f6a140 100644 (file)
@@ -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);