device-mapper-multipath/SOURCES/0003-Fix-leak-in-mpathpersi...

29 lines
780 B
Diff

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