From 005adb0a0a5bfbe3ffbf94a41b1619001d8576b3 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 8 Jul 2016 11:46:13 +0100 Subject: [PATCH] dmstats: ensure dm_stats_delete_region() return is checked --- tools/dmsetup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/dmsetup.c b/tools/dmsetup.c index b67562562..83d45da65 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -5040,7 +5040,10 @@ static int _stats_delete(CMD_ARGS) log_info("Deleted statistics region %" PRIu64, region_id); } } else { - dm_stats_delete_region(dms, region_id); + if (!dm_stats_delete_region(dms, region_id)) { + log_error("Could not delete statistics region"); + goto out; + } log_info("Deleted statistics region " FMTu64 ".\n", region_id); }