[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] [PATCH 12/30] Check for NULL pointer



clangs is happier

Signed-off-by: Zdenek Kabelac <zkabelac redhat com>
---
 tools/reporter.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/reporter.c b/tools/reporter.c
index f39d23f..eb0a857 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -323,7 +323,7 @@ static int _report(struct cmd_context *cmd, int argc, char **argv,
 			log_error("Invalid options string: %s", opts);
 			return EINVALID_CMD_LINE;
 		}
-		if (*opts == '+') {
+		if (*opts == '+' && options) {
 			if (!(str = dm_pool_alloc(cmd->mem,
 					 strlen(options) + strlen(opts) + 1))) {
 				log_error("options string allocation failed");
-- 
1.7.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]