代码拉取完成,页面将自动刷新
From cfa57e264efa138e99257fbfbe18449150a96c4d Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Thu, 14 Feb 2019 20:18:04 +0100
Subject: [PATCH] install: string_hash_func should not be fed with NULL
If kmod_module_get_path returns NULL, we should skip that entry,
the hash function does not like NULL pointers.
(cherry picked from commit fc141f22869bad2e5409d1cc555c1a42ea738343)
Resolves: #1868525
---
install/dracut-install.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/install/dracut-install.c b/install/dracut-install.c
index 51f79422..f8ec9a59 100644
--- a/install/dracut-install.c
+++ b/install/dracut-install.c
@@ -1248,6 +1248,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;
@@ -1257,7 +1260,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;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。