Blame SOURCES/0003-Fix-leak-in-mpathpersist.patch

b6d9ac
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
b6d9ac
From: Benjamin Marzinski <bmarzins@redhat.com>
b6d9ac
Date: Tue, 8 Oct 2019 10:17:11 -0500
b6d9ac
Subject: [PATCH] Fix leak in mpathpersist
b6d9ac
b6d9ac
If the persistent in command fails, the response buffer must be freed.
b6d9ac
Found by Coverity
b6d9ac
b6d9ac
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
b6d9ac
---
b6d9ac
 mpathpersist/main.c | 1 +
b6d9ac
 1 file changed, 1 insertion(+)
b6d9ac
b6d9ac
diff --git a/mpathpersist/main.c b/mpathpersist/main.c
b6d9ac
index 278b8d51..920e686c 100644
b6d9ac
--- a/mpathpersist/main.c
b6d9ac
+++ b/mpathpersist/main.c
b6d9ac
@@ -499,6 +499,7 @@ static int handle_args(int argc, char * argv[], int nline)
b6d9ac
 		if (ret != MPATH_PR_SUCCESS )
b6d9ac
 		{
b6d9ac
 			fprintf (stderr, "Persistent Reserve IN command failed\n");
b6d9ac
+			free(resp);
b6d9ac
 			goto out_fd;
b6d9ac
 		}
b6d9ac
 
b6d9ac
-- 
b6d9ac
2.17.2
b6d9ac