mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Fix resource leak of dlopened pointer
Add missing dlclose in _init_formats() error path. Use return_0 to print stack trace from the call.
This commit is contained in:
parent
2044eacc7e
commit
e8ec0ba2e3
@ -1,5 +1,6 @@
|
||||
Version 2.02.78 -
|
||||
====================================
|
||||
Fix missing dlclose in _init_formats() error path from init_format call.
|
||||
Fix missing fclose for _umount() in dmeventd snapshot plugin.
|
||||
Fix out-of-scope variable usage in process_each_lv().
|
||||
Fix dm_task_destroy(NULL) call in _node_clear_table() error path.
|
||||
|
@ -814,8 +814,11 @@ static int _init_formats(struct cmd_context *cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(fmt = init_format_fn(cmd)))
|
||||
return 0;
|
||||
if (!(fmt = init_format_fn(cmd))) {
|
||||
dlclose(lib);
|
||||
return_0;
|
||||
}
|
||||
|
||||
fmt->library = lib;
|
||||
dm_list_add(&cmd->formats, &fmt->list);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user