]> git.ipfire.org Git - thirdparty/dracut.git/blobdiff - install/dracut-install.c
install: string_hash_func should not be fed with NULL
[thirdparty/dracut.git] / install / dracut-install.c
index d64de545a0acad5859691e96e501febeafaff190..9e415b5e7a03b2f9deb113334f9b561c3d5b33d9 100644 (file)
@@ -1244,6 +1244,9 @@ static int install_dependent_modules(struct kmod_list *modlist)
                 mod = kmod_module_get_module(itr);
                 path = kmod_module_get_path(mod);
 
+                if (path == NULL)
+                        continue;
+
                if (check_hashmap(items_failed, path))
                        return -1;
 
@@ -1253,7 +1256,7 @@ static int install_dependent_modules(struct kmod_list *modlist)
 
                 name = kmod_module_get_name(mod);
 
-                if ((path == NULL) || (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0))) {
+                if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) {
                         continue;
                 }