Check for valid argument in update_multipath_strings()
authorHannes Reinecke <hare@suse.de>
Mon, 26 Apr 2010 10:01:40 +0000 (12:01 +0200)
committerHannes Reinecke <hare@suse.de>
Wed, 18 May 2011 07:52:29 +0000 (09:52 +0200)
We need to check for a valid argument here.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/structs_vec.c

index a1be5de..8aad2b8 100644 (file)
@@ -276,6 +276,9 @@ update_multipath_status (struct multipath *mpp)
 extern int
 update_multipath_strings (struct multipath *mpp, vector pathvec)
 {
+       if (!mpp)
+               return 1;
+
        condlog(4, "%s: %s", mpp->alias, __FUNCTION__);
 
        free_multipath_attributes(mpp);