multipath: fix libudev bug in sysfs_get_tgt_nodename
authorBenjamin Marzinski <bmarzins@redhat.com>
Mon, 11 Jun 2012 21:32:35 +0000 (16:32 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 12 Jun 2012 04:30:25 +0000 (06:30 +0200)
commitcb0f7127ba90ab5e8e71fc534a0a16cdbe96a88f
treea7955019d8b132b2e5714c88f70ae18d4a4c57a4
parent1ef46588784b582f7f4c7fd890a1e093704528ee
multipath: fix libudev bug in sysfs_get_tgt_nodename

In a recent patch, I introduced a bug into sysfs_get_tgt_nodename().
multipath must not unreference the target udevice before it copies the
tgt_nodename to another location, otherwise the value pointer will be
pointing at freed memory.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/discovery.c