[PATCH 07/39] libmultipath: missing NULL check in set_pgfailback()

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

 



Found by coverity.

Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
---
 libmultipath/dict.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index 7f912ec..9920a9b 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -805,6 +805,8 @@ set_pgfailback(vector strvec, void *ptr)
 	char * buff;
 
 	buff = set_value(strvec);
+	if (!buff)
+		return 1;
 
 	if (strlen(buff) == 6 && !strcmp(buff, "manual"))
 		*int_ptr = -FAILBACK_MANUAL;
-- 
2.6.6

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux