mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
dmsetup: do not start dmfilemapd if region creation fails (coverity)
This commit is contained in:
parent
6740eb1c2b
commit
11749e7adb
@ -5110,6 +5110,11 @@ static int _stats_create_file(CMD_ARGS)
|
|||||||
regions = dm_stats_create_regions_from_fd(dms, fd, group, precise,
|
regions = dm_stats_create_regions_from_fd(dms, fd, group, precise,
|
||||||
bounds, alias);
|
bounds, alias);
|
||||||
|
|
||||||
|
if (!regions) {
|
||||||
|
log_error("Could not create regions from file %s", abspath);
|
||||||
|
goto bad;
|
||||||
|
}
|
||||||
|
|
||||||
if (!_switches[NOMONITOR_ARG] && group) {
|
if (!_switches[NOMONITOR_ARG] && group) {
|
||||||
if (!dm_stats_start_filemapd(fd, regions[0], abspath, mode,
|
if (!dm_stats_start_filemapd(fd, regions[0], abspath, mode,
|
||||||
foreground, verbose))
|
foreground, verbose))
|
||||||
@ -5121,11 +5126,6 @@ static int _stats_create_file(CMD_ARGS)
|
|||||||
|
|
||||||
fd = -1;
|
fd = -1;
|
||||||
|
|
||||||
if (!regions) {
|
|
||||||
log_error("Could not create regions from file %s", abspath);
|
|
||||||
goto bad;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (region = regions; *region != DM_STATS_REGIONS_ALL; region++)
|
for (region = regions; *region != DM_STATS_REGIONS_ALL; region++)
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user