mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
dmsetup: don't free handle if dm_stats_create fails (Coverity)
The error path of _stats_list frees the task and stats objects: don't try to branch to it before they have been allocated. tools/dmsetup.c: 4589 in _stats_help() - Null pointer dereferences (FORWARD_NULL)
This commit is contained in:
parent
f9f5aac123
commit
ec87e88c52
@ -4253,7 +4253,7 @@ static int _stats_list(CMD_ARGS)
|
||||
return 1;
|
||||
|
||||
if (!(dms = dm_stats_create(DM_STATS_PROGRAM_ID)))
|
||||
goto_out;
|
||||
return_0;
|
||||
|
||||
if (!_bind_stats_device(dms, name))
|
||||
goto_out;
|
||||
|
Loading…
Reference in New Issue
Block a user