diff mbox

[5/8] multipathd: fix memory corruption issue

Message ID 1421439812-11826-6-git-send-email-bmarzins@redhat.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

Benjamin Marzinski Jan. 16, 2015, 8:23 p.m. UTC
setup_multipath already removes the mpp if it fails, so we shouldn't be
accessing the mpp at all if it fails, and especially not freeing it.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 multipathd/main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/multipathd/main.c b/multipathd/main.c
index 3afed62..a194c80 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -657,9 +657,8 @@  ev_remove_path (struct path *pp, struct vectors * vecs)
 			/*
 			 * update our state from kernel
 			 */
-			if (setup_multipath(vecs, mpp)) {
-				goto fail;
-			}
+			if (setup_multipath(vecs, mpp))
+				return 1;
 			sync_map_state(mpp);
 
 			condlog(2, "%s [%s]: path removed from map %s",