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 586de489cb9035f0c249d552db9a83b35cd0a342..0f6a1405c3a1bd93bf925e92db5e858c441ea9ae 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);