Fix hardware entry matching code
authorBenjamin Marzinski <bmarzins@redhat.com>
Thu, 2 May 2013 21:46:27 +0000 (16:46 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 6 May 2013 19:40:59 +0000 (21:40 +0200)
commit635b4f6449dbd194dca1f3b92cd4336edeec5595
tree1e8f7ed4253421ddb9c40de79867cdfa2cca903e
parent3eaac2cc41cd6cbfc68a922262c6d2b5476be948
Fix hardware entry matching code

When a user defined hardware table entry's identifiers exactly
match a built-in one's, the built-in one is removed, and the list
is rescaned.  However, the built-in entry is not freed, and on the
rescan, the first user defined entry is treated as a built-in
entry. This patch frees the built-in entry, and decrements the
number of built-in entries, so that the rescan works as expected.

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