From e75b4bc2df7ce9bf3b3644fb0e6d9d52467adb8e Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 7 Sep 2015 11:52:54 +0100 Subject: [PATCH] libdm: check dm_pool_begin_object() return value. --- libdm/libdm-stats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index 561637051..0655ac555 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -717,7 +717,8 @@ static int _stats_parse_histogram(struct dm_pool *mem, char *hist_str, c = hist_str; - dm_pool_begin_object(mem, sizeof(cur)); + if (!dm_pool_begin_object(mem, sizeof(cur))) + return_0; hist.nr_bins = nr_bins;