[libmultipath] Fix segfault, when the syfs attribute doesn't exist
authorChristophe Varoqui <cvaroqui@zezette.localdomain>
Thu, 7 Jun 2007 20:39:45 +0000 (22:39 +0200)
committerChristophe Varoqui <cvaroqui@zezette.localdomain>
Thu, 7 Jun 2007 20:39:45 +0000 (22:39 +0200)
commit178b93111d54828a89ad280c0aaaea0812343a6a
tree4f184cc88d5a110474a5eb82820ba3a1ef695c92
parent8ccef7c766a4891140488d12d93e5eb930271bf2
[libmultipath] Fix segfault, when the syfs attribute doesn't exist

open '/class/fc_transport/target7:0:0'/'node_name'
new uncached attribute '/sys/class/fc_transport/target7:0:0/node_name'
add to cache '/sys/class/fc_transport/target7:0:0/node_name'
stat '/sys/class/fc_transport/target7:0:0/node_name' failed: No such file or directory

This would allocate no space for attr->value but and the next lookup tries to
dereference a NULL pointer.

Signed-off-by: Guido Guenther <agx@sigxcpu.org>
libmultipath/sysfs.c