From 18fd0bd20ce1d4a7d2bd27b2c9981a402f9bcd2e Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 9 Nov 2015 09:48:17 +0100 Subject: [PATCH] lvconvert: add extra check for existance of pointer Coverity here is not fully-in-picture - but please it with validation of pointer which currently cannot be null, since we always return at least empty string. --- tools/lvconvert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lvconvert.c b/tools/lvconvert.c index a7df26d13..c6cea0d25 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -2340,7 +2340,7 @@ static int _lvconvert_pool_repair(struct cmd_context *cmd, struct pipe_data pdata; FILE *f; - if (!thin_repair[0]) { + if (!thin_repair || !thin_repair[0]) { log_error("Thin repair commnand is not configured. Repair is disabled."); return 0; /* Checking disabled */ }