mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Fix resource leak when strdup fails
Static analyzer noticed, strdup failing path leaks dmt structure.
This commit is contained in:
parent
04e647aa84
commit
316d14d45f
@ -751,8 +751,10 @@ static struct dm_task *_get_device_status(struct thread_status *ts)
|
||||
if (!dmt)
|
||||
return NULL;
|
||||
|
||||
if (!dm_task_set_uuid(dmt, ts->device.uuid))
|
||||
return NULL;
|
||||
if (!dm_task_set_uuid(dmt, ts->device.uuid)) {
|
||||
dm_task_destroy(dmt);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!dm_task_run(dmt)) {
|
||||
dm_task_destroy(dmt);
|
||||
|
Loading…
Reference in New Issue
Block a user