From: Bryn M. Reeves Date: Mon, 18 Jul 2016 17:46:21 +0000 (+0100) Subject: dmstats: fix bounds leak in _do_stats_create_regions() (Coverity) X-Git-Tag: v2_02_162~47 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=da49d4d54eac64a491b133bdb95e8dd04b6cde8f;p=lvm2.git dmstats: fix bounds leak in _do_stats_create_regions() (Coverity) --- diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 985f63b03..ff42a9e58 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -4842,15 +4842,15 @@ static int _do_stats_create_regions(struct dm_stats *dms, struct dm_info info; void *next = NULL; - if (histogram && !(bounds = dm_histogram_bounds_from_string(histogram))) - return_0; - if (_switches[ALIAS_ARG] && _switches[NOGROUP_ARG]) { log_error("Cannot set alias with --nogroup."); dm_stats_destroy(dms); return 0; } + if (histogram && !(bounds = dm_histogram_bounds_from_string(histogram))) + return_0; + if (!(dmt = dm_task_create(DM_DEVICE_TABLE))) { dm_histogram_bounds_destroy(bounds); dm_stats_destroy(dms);