Blame SOURCES/0016-kpartx-fix-new-memory-leak-in-dm_find_part.patch

5c2e41
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5c2e41
From: Benjamin Marzinski <bmarzins@redhat.com>
5c2e41
Date: Thu, 11 Oct 2018 15:37:52 -0500
5c2e41
Subject: [PATCH] kpartx: fix new memory leak in dm_find_part
5c2e41
5c2e41
While commit 960bb238 fixed one memory leak, it created another.
5c2e41
5c2e41
Fixes: 960bb238 ("kpartx: Fix memory leak of uuid found by coverity")
5c2e41
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
5c2e41
---
5c2e41
 kpartx/devmapper.c | 1 +
5c2e41
 1 file changed, 1 insertion(+)
5c2e41
5c2e41
diff --git a/kpartx/devmapper.c b/kpartx/devmapper.c
5c2e41
index 8db1eb5..3aa4988 100644
5c2e41
--- a/kpartx/devmapper.c
5c2e41
+++ b/kpartx/devmapper.c
5c2e41
@@ -690,6 +690,7 @@ int dm_find_part(const char *parent, const char *delim, int part,
5c2e41
 
5c2e41
 	r = dm_rename(tmp, name);
5c2e41
 	if (r == 1) {
5c2e41
+		free(tmp);
5c2e41
 		*part_uuid = uuid;
5c2e41
 		return 1;
5c2e41
 	}
5c2e41
-- 
5c2e41
2.17.1
5c2e41