Skip to contentSkip to conversation

Fix small memory leak

PATCH Applied Thomas Jarosch 2 participants 2 messages Aug 26, 2011 – Sep 7, 2011 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix small memory leak

Found by cppcheck

---
 config.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
config.c +2 -0
index ad75411..c0a6baa 100644
@@ -707,6 +707,8 @@ void autoline(char *line)
 	for (i = 0; i < super_cnt; i++)
 		if (!seen[i])
 			policy_add(rule_policy, pol_auto, dflt, pol_metadata, superlist[i]->name, NULL);
+
+	free(seen);
 }
 
 int loaded = 0;
Signature · 1 line
1.7.4.4
Applied
#1 lore raw
Quoted 12 lines · On Fri, 26 Aug 2011 07:33:37 +0200 Thomas Jarosch…

Found by cppcheck

---
 config.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
config.c +0 -0
index ad75411..c0a6baa 100644

config.c void autoline(char *line) · line 714

Quoted 8 lines
config.c +2 -0
@@ -707,6 +707,8 @@ void autoline(char *line)
 	for (i = 0; i < super_cnt; i++)
 		if (!seen[i])
 			policy_add(rule_policy, pol_auto, dflt, pol_metadata, superlist[i]->name, NULL);
+
+	free(seen);
 }
 
 int loaded = 0;

Applied, thanks.

NeilBrown