Harald Hoyer 75f812
From e0904b27ff821c067ae62c227db8fef45638a827 Mon Sep 17 00:00:00 2001
Harald Hoyer 75f812
From: Kamil Rytarowski <n54@gmx.com>
Harald Hoyer 75f812
Date: Sat, 11 May 2013 14:54:38 +0200
Harald Hoyer 75f812
Subject: [PATCH] Fix memory leak
Harald Hoyer 75f812
Harald Hoyer 75f812
---
Harald Hoyer 75f812
 install/dracut-install.c | 2 +-
Harald Hoyer 75f812
 1 file changed, 1 insertion(+), 1 deletion(-)
Harald Hoyer 75f812
Harald Hoyer 75f812
diff --git a/install/dracut-install.c b/install/dracut-install.c
Harald Hoyer 75f812
index c8328b0..a1c6461 100644
Harald Hoyer 75f812
--- a/install/dracut-install.c
Harald Hoyer 75f812
+++ b/install/dracut-install.c
Harald Hoyer 75f812
@@ -258,7 +258,7 @@ static int resolve_deps(const char *src)
Harald Hoyer 75f812
 {
Harald Hoyer 75f812
         int ret = 0;
Harald Hoyer 75f812
 
Harald Hoyer 75f812
-        char *buf = malloc(LINE_MAX);
Harald Hoyer 75f812
+        _cleanup_free_ char *buf = malloc(LINE_MAX);
Harald Hoyer 75f812
         size_t linesize = LINE_MAX;
Harald Hoyer 75f812
         _cleanup_pclose_ FILE *fptr = NULL;
Harald Hoyer 75f812
         _cleanup_free_ char *cmd = NULL;