From 7ec04256a56709963e8b954fc6036ca6ba1db137 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Tue, 8 Jan 2019 23:54:09 +0100 Subject: [PATCH] libmultipath(coverity): fix possible NULL dereference coverity warns that recv_packet may set reply to NULL. Signed-off-by: Martin Wilck --- libmultipath/configure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/configure.c b/libmultipath/configure.c index 39d2a956..af4d78de 100644 --- a/libmultipath/configure.c +++ b/libmultipath/configure.c @@ -1041,7 +1041,7 @@ int check_daemon(void) if (recv_packet(fd, &reply, timeout) != 0) goto out; - if (strstr(reply, "shutdown")) + if (reply && strstr(reply, "shutdown")) goto out_free; ret = 1; -- 2.11.0