From 9e3a9eab0ebf06fb5ed969269e11cb9b31d033fa Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac <zkabelac@redhat.com> Date: Tue, 23 Feb 2016 21:03:50 +0100 Subject: [PATCH] coverity: check for dm_snprintf Check return state like everywhere else. --- lib/report/report.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/report/report.c b/lib/report/report.c index ed6202c2e..bd7c163ca 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -1446,7 +1446,8 @@ static int _do_get_kernel_cache_settings_list(struct dm_pool *mem, buf_len = strlen(key) + strlen(value) + 2; if (!(buf = dm_pool_alloc(mem, buf_len))) return_0; - dm_snprintf(buf, buf_len, "%s=%s", key, value); + if (dm_snprintf(buf, buf_len, "%s=%s", key, value) < 0) + return_0; if (!str_list_add_no_dup_check(mem, result, buf)) return_0; } -- 2.43.5