index_file_open: fix another fd leak on error path.
diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c
index 9a0dd2a..580b059 100644
--- a/libkmod/libkmod-index.c
+++ b/libkmod/libkmod-index.c
@@ -348,8 +348,10 @@
 	}
 
 	version = read_long(file);
-	if (version >> 16 != INDEX_VERSION_MAJOR)
+	if (version >> 16 != INDEX_VERSION_MAJOR) {
+		fclose(file);
 		return NULL;
+	}
 
 	new = NOFAIL(malloc(sizeof(struct index_file)));
 	new->file = file;