[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 10/14] daemon: Fix leak of strings in md-detail (found by valgrind).



From: "Richard W.M. Jones" <rjones redhat com>

---
 daemon/md.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/daemon/md.c b/daemon/md.c
index fea3cf4..f6dc603 100644
--- a/daemon/md.c
+++ b/daemon/md.c
@@ -297,7 +297,7 @@ do_md_detail(const char *md)
 
   free (out);
   free (err);
-  free (lines); /* We freed the contained strings when we freed out */
+  free_strings (lines);
 
   if (add_string (&ret, &size, &alloc, NULL) == -1) return NULL;
 
@@ -307,7 +307,7 @@ error:
   free (out);
   free (err);
   if (lines)
-    free (lines);
+    free_strings (lines);
   if (ret)
     free_strings (ret);
 
-- 
1.7.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]