From 4ef1f345498045b6757247dc64baad8252260583 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 18 Jul 2016 18:08:51 +0100 Subject: [PATCH] libdm: free hist_arg in _stats_create_file_regions() (Coverity) --- libdm/libdm-stats.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index 57ef11d4a..1c2e19b88 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -4323,6 +4323,8 @@ static uint64_t *_stats_create_file_regions(struct dm_stats *dms, int fd, } regions[*count] = DM_STATS_REGION_NOT_PRESENT; + if (bounds) + dm_free(hist_arg); dm_pool_free(dms->mem, extents); return regions; @@ -4335,6 +4337,7 @@ out_remove: out: dm_pool_free(dms->mem, extents); + dm_free(hist_arg); dm_free(regions); return NULL; }