From: "Benjamin Marzinski" Subject: [PATCH 05/15] multipathd: fix memory corruption issue Date: Sat, 7 Mar 2015 21:31:36 -0600 Message-ID: <1425785506-20419-6-git-send-email-bmarzins@redhat.com> References: <1425785506-20419-1-git-send-email-bmarzins@redhat.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1425785506-20419-1-git-send-email-bmarzins@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: device-mapper development Cc: Christophe Varoqui List-Id: dm-devel.ids 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 --- multipathd/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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", -- 1.8.3.1