[multipathd] Fix segfault on disappearing paths
authorChristophe Varoqui <cvaroqui@zezette.localdomain>
Sat, 9 Jun 2007 16:35:09 +0000 (18:35 +0200)
committerChristophe Varoqui <cvaroqui@zezette.localdomain>
Sat, 9 Jun 2007 16:35:09 +0000 (18:35 +0200)
commitf1b1fca2ccbfd7d58350eb136105fdaf8aa4f59c
tree7e0876bdd8969ea375d35debccc8ba1111d6a28b
parente5e4b5ceacd5bac77c28a31efb25174c457b272b
[multipathd] Fix segfault on disappearing paths

The path might already be gone when we process the udev event, in this case
sysfs_device_get return NULL:

Jun 09 16:56:06 | ID_FS_LABEL=
Jun 09 16:56:06 | ID_FS_LABEL_SAFE=
Jun 09 16:56:06 | DEVLINKS=/dev/disk/by-id/scsi-1494554000000000000000000000000010000069d0000000d /dev/disk/by-path/ip-10.0.0.3:3260-iscsi-iqn.2006-12.nix.rs45:storage.disk1-lun-0 /dev/disk/by-uuid/c8db60a3-7795-45cd-8369-a0f9ee876032
Jun 09 16:56:06 | DEVNAME=/dev/sda
/block/sda
open '/block/sda'
stat '/sys/block/sda' failed: No such file or directory
Segmentation fault (core dumped)

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