mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 09:30:31 +01:00
initrd: fix crash in the NBFT parser
The shared library handle is not initialized when there are no NBFT
entries.
Fixes: 1cb0635d08 ('initrd: add new NBFT parser')
This commit is contained in:
parent
39b38e5905
commit
d26714481d
1 changed files with 2 additions and 1 deletions
|
|
@ -398,7 +398,8 @@ nmi_nbft_reader_parse(const char *sysfs_dir, char **hostname)
|
|||
}
|
||||
|
||||
g_dir_close(dir);
|
||||
dlclose(libnvme_handle);
|
||||
if (libnvme_handle)
|
||||
dlclose(libnvme_handle);
|
||||
g_ptr_array_add(a, NULL); /* trailing NULL-delimiter */
|
||||
return (NMConnection **) g_ptr_array_free(g_steal_pointer(&a), FALSE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue