]> sourceware.org Git - lvm2.git/commitdiff
dmstats: fix bounds leak in _do_stats_create_regions() (Coverity)
authorBryn M. Reeves <bmr@redhat.com>
Mon, 18 Jul 2016 17:46:21 +0000 (18:46 +0100)
committerBryn M. Reeves <bmr@redhat.com>
Mon, 18 Jul 2016 17:48:34 +0000 (18:48 +0100)
tools/dmsetup.c

index 985f63b0331022e84913b27b370538b8d6663257..ff42a9e589b4bb259128332cc5898c7ab4d73480 100644 (file)
@@ -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);
This page took 0.040773 seconds and 5 git commands to generate.