eal/windows: add missing SPDX license tag
[dpdk.git] / drivers / crypto / ccp / ccp_pci.c
index 59152ca..38029a9 100644 (file)
@@ -15,6 +15,7 @@
 static const char * const uio_module_names[] = {
        "igb_uio",
        "uio_pci_generic",
+       "vfio_pci"
 };
 
 int
@@ -31,12 +32,15 @@ ccp_check_pci_uio_module(void)
        while (uio_module_names[i] != NULL) {
                while (fgets(buf, sizeof(buf), fp) != NULL) {
                        if (!strncmp(buf, uio_module_names[i],
-                                    strlen(uio_module_names[i])))
+                                    strlen(uio_module_names[i]))) {
+                               fclose(fp);
                                return i;
+                       }
                }
                i++;
                rewind(fp);
        }
+       fclose(fp);
        printf("Insert igb_uio or uio_pci_generic kernel module(s)");
        return -1;/* uio not inserted */
 }