libblockdev/0014-mdraid-Fix-memory-leak.patch
Zhiqiang Liu bcdad3cefb libblockdev: backport upstream patches - epoch2 to fix several problems
backport upstream patches - epoch2 to fix several problems

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
2020-10-31 09:11:11 +08:00

25 lines
748 B
Diff

From d60f654d4547febf7c6ce5353a403ca0df60450c Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Fri, 25 Sep 2020 14:27:22 +0200
Subject: [PATCH 14/15] mdraid: Fix memory leak
---
src/plugins/mdraid.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/plugins/mdraid.c b/src/plugins/mdraid.c
index 74af744..b97bc64 100644
--- a/src/plugins/mdraid.c
+++ b/src/plugins/mdraid.c
@@ -1332,6 +1332,7 @@ gchar* bd_md_name_from_node (const gchar *node, GError **error) {
continue;
}
node_name = g_path_get_basename (dev_path);
+ g_free (dev_path);
if (g_strcmp0 (node_name, node) == 0) {
found = TRUE;
name = g_path_get_basename (*path_p);
--
1.8.3.1