mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
coverity: fix error paths
Patch 74e704bb44
missed to update
error path. Since now we just need to 'return_0' as 'dmt is NULL
and thus may not be destroyed.
This commit is contained in:
parent
cbf99be43a
commit
99e96f3ce9
@ -1,5 +1,6 @@
|
||||
Version 2.02.151 -
|
||||
=================================
|
||||
Fix error path after reusing of _setup_task (2.02.150).
|
||||
Fix memory access for empty sysfs values (2.02.149).
|
||||
Disable lvmetad when lvm1 metadata is seen, so commands revert to scanning.
|
||||
Suppress errors when snapshot merge gets delayed because volume is in use.
|
||||
|
@ -381,7 +381,7 @@ static int _device_is_suspended(int major, int minor)
|
||||
|
||||
if (!(dmt = _setup_task(NULL, NULL, NULL, DM_DEVICE_INFO,
|
||||
major, minor, 0)))
|
||||
goto_out;
|
||||
return_0;
|
||||
|
||||
if (!dm_task_run(dmt) ||
|
||||
!dm_task_get_info(dmt, &info)) {
|
||||
@ -406,7 +406,7 @@ static int _ignore_suspended_snapshot_component(struct device *dev)
|
||||
|
||||
if (!(dmt = _setup_task(NULL, NULL, NULL, DM_DEVICE_TABLE,
|
||||
MAJOR(dev->dev), MINOR(dev->dev), 0)))
|
||||
goto_out;
|
||||
return_0;
|
||||
|
||||
if (!dm_task_run(dmt)) {
|
||||
log_error("Failed to get state of snapshot or snapshot origin device");
|
||||
@ -529,7 +529,7 @@ int device_is_usable(struct device *dev, struct dev_usable_check_params check)
|
||||
|
||||
if (!(dmt = _setup_task(NULL, NULL, NULL, DM_DEVICE_STATUS,
|
||||
MAJOR(dev->dev), MINOR(dev->dev), 0)))
|
||||
goto_out;
|
||||
return_0;
|
||||
|
||||
/* Non-blocking status read */
|
||||
if (!dm_task_no_flush(dmt))
|
||||
|
Loading…
Reference in New Issue
Block a user