mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
util/module: fix a memory leak
spotted by ASAN
Fixes: 81d8ccb1be
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1576805650-16380-1-git-send-email-pannengyuan@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
bfffeac8aa
commit
638be47830
1 changed files with 1 additions and 0 deletions
|
@ -214,6 +214,7 @@ bool module_load_one(const char *prefix, const char *lib_name)
|
|||
|
||||
if (!success) {
|
||||
g_hash_table_remove(loaded_modules, module_name);
|
||||
g_free(module_name);
|
||||
}
|
||||
|
||||
for (i = 0; i < n_dirs; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue