xenserver: updated xen-bugtool to XenServer trunk version.
[openvswitch] / lib / dpif-linux.c
index d707b46ca51011b16fb937bb7e7e3dfb0bffebaf..1eaba744903b9357b5b7cb15b0f7933568554ca3 100644 (file)
@@ -107,7 +107,7 @@ dpif_linux_enumerate(struct svec *all_dps)
 }
 
 static int
-dpif_linux_open(const char *name, const char *type UNUSED, bool create,
+dpif_linux_open(const char *name, const char *type OVS_UNUSED, bool create,
                 struct dpif **dpifp)
 {
     int minor;
@@ -188,7 +188,7 @@ dpif_linux_get_all_names(const struct dpif *dpif_, struct svec *all_names)
 }
 
 static int
-dpif_linux_delete(struct dpif *dpif_)
+dpif_linux_destroy(struct dpif *dpif_)
 {
     return do_ioctl(dpif_, ODP_DP_DESTROY, NULL);
 }
@@ -467,7 +467,7 @@ const struct dpif_class dpif_linux_class = {
     dpif_linux_open,
     dpif_linux_close,
     dpif_linux_get_all_names,
-    dpif_linux_delete,
+    dpif_linux_destroy,
     dpif_linux_get_stats,
     dpif_linux_get_drop_frags,
     dpif_linux_set_drop_frags,
@@ -677,6 +677,8 @@ get_major(const char *target)
         }
     }
 
+    fclose(file);
+
     VLOG_ERR("%s: %s major not found (is the module loaded?)", fn, target);
     return -ENODEV;
 }