From da49d4d54eac64a491b133bdb95e8dd04b6cde8f Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 18 Jul 2016 18:46:21 +0100 Subject: [PATCH] dmstats: fix bounds leak in _do_stats_create_regions() (Coverity) --- tools/dmsetup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.43.5