This patch fixes a memory leak in the clean_temp module.

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.

From 053205b24a2c163a6d0cbdf1aad79551e2a0ba19 Mon Sep 17 00:00:00 2001
From: John Darrington <[email protected]>
Date: Sat, 28 Jul 2012 08:36:34 +0200
Subject: [PATCH] Fix memory leak in clean-temp.c

The two lists subdirs and files were never being freed.  This change fixes that.
---
 lib/clean-temp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/clean-temp.c b/lib/clean-temp.c
index ef926e5..420bf6f 100644
--- a/lib/clean-temp.c
+++ b/lib/clean-temp.c
@@ -557,6 +557,8 @@ cleanup_temp_dir (struct temp_dir *dir)
         else
           cleanup_list.tempdir_list[i] = NULL;
         /* Now only we can free the tmpdir->dirname and tmpdir itself.  */
+        gl_list_free (tmpdir->files);
+        gl_list_free (tmpdir->subdirs);
         free (tmpdir->dirname);
         free (tmpdir);
         return err;
-- 
1.7.2.5

Attachment: signature.asc
Description: Digital signature

Reply via email to