]> sourceware.org Git - lvm2.git/commitdiff
coverity: check for dm_snprintf
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 23 Feb 2016 20:03:50 +0000 (21:03 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 23 Feb 2016 20:40:17 +0000 (21:40 +0100)
Check return state like everywhere else.

lib/report/report.c

index ed6202c2e73e5c429f864f5babaf267b27ed3124..bd7c163ca8a9425d6d985b9dadb4e3755abfc3a7 100644 (file)
@@ -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;
        }
This page took 1.601083 seconds and 5 git commands to generate.