mdadm/0113-config.c-Fix-memory-leak-in-load_containers.patch
Xiao Ni f1b7707f26 Update to latest upstream
For issue RHEL-40729, patch 0142 fixes it.
For issue RHEL-31448, patch 0125 fixes it.

Resolves: RHEL-31448,RHEL-40729,RHEL-52059

Signed-off-by: Xiao Ni <xni@redhat.com>
2024-10-19 05:22:07 -04:00

29 lines
667 B
Diff

From 44457789fd67168c37932060f9a991f0c611e5a2 Mon Sep 17 00:00:00 2001
From: Anna Sztukowska <anna.sztukowska@intel.com>
Date: Fri, 28 Jun 2024 12:32:16 +0200
Subject: [PATCH 113/201] config.c: Fix memory leak in load_containers()
Fix memory leak in load_containers() in config.c reported by SAST
analysis.
Signed-off-by: Anna Sztukowska <anna.sztukowska@intel.com>
---
config.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/config.c b/config.c
index 612e700d..cd2379bd 100644
--- a/config.c
+++ b/config.c
@@ -379,6 +379,7 @@ struct mddev_dev *load_containers(void)
map = NULL;
}
free_mdstat(mdstat);
+ map_free(map);
return rv;
}
--
2.41.0