From d1f0b89e65fd8817930bbf89051fe03efb0a1db5 Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Tue, 28 Nov 2023 21:41:35 +0100 Subject: [PATCH] dmstats: Fix memory leak on error path --- libdm/libdm-stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index 3b1fbe8a0..47f028155 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -2047,7 +2047,7 @@ static int _stats_create_region(struct dm_stats *dms, uint64_t *region_id, (strlen(hist_arg)) ? HISTOGRAM_ARG : "", hist_arg)) < 0) { log_error(err_fmt, PRECISE_ARG " option."); - return 0; + goto out; } } else opt_args = dm_strdup("");