mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
dmstats: free bounds string in _stats_create_file() (Coverity)
This commit is contained in:
parent
4ef1f34549
commit
da146ae9b9
@ -5012,8 +5012,15 @@ static int _stats_create_file(CMD_ARGS)
|
||||
}
|
||||
}
|
||||
|
||||
if (histogram && !(bounds = dm_histogram_bounds_from_string(histogram)))
|
||||
if (!(abspath = _get_abspath(path))) {
|
||||
log_error("Could not canonicalize file name: %s", path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (histogram && !(bounds = dm_histogram_bounds_from_string(histogram))) {
|
||||
dm_free(abspath);
|
||||
return_0;
|
||||
}
|
||||
|
||||
if (_switches[PROGRAM_ID_ARG])
|
||||
program_id = _string_args[PROGRAM_ID_ARG];
|
||||
@ -5023,11 +5030,6 @@ static int _stats_create_file(CMD_ARGS)
|
||||
precise = _int_args[PRECISE_ARG];
|
||||
group = !_switches[NOGROUP_ARG];
|
||||
|
||||
if (!(abspath = _get_abspath(path))) {
|
||||
log_error("Could not canonicalize file name: %s", path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(dms = dm_stats_create(DM_STATS_PROGRAM_ID)))
|
||||
return_0;
|
||||
|
||||
@ -5089,7 +5091,6 @@ static int _stats_create_file(CMD_ARGS)
|
||||
return 1;
|
||||
|
||||
bad:
|
||||
if (abspath)
|
||||
dm_free(abspath);
|
||||
|
||||
if ((fd > -1) && close(fd))
|
||||
|
Loading…
Reference in New Issue
Block a user