libmultipath: fix segfault when vector is null
authorMike Christie <michaelc@cs.wisc.edu>
Tue, 8 Jan 2013 19:36:34 +0000 (13:36 -0600)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 8 Jan 2013 22:09:44 +0000 (23:09 +0100)
commit00449df70261aeda96a02468daa6be9ae83bff5f
treef23dbe5b1d62b078dd938a6570b9f4962d21bea9
parent04bfbfea6a4059d953c5c8e9d5b72910f828a8d6
libmultipath: fix segfault when vector is null

While performing tests that caused paths to get added
and deleted, we hit a segfault. We traced it to the
vector struct being NULL. This patch fixes the problem
by checking for a NULL vector before accessing it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
libmultipath/vector.c