* lib/clean-temp.c (cleanup_temp_dir): Free also the 'subdirs' and
'files' members of tmpdir.
+2012-07-28 John Darrington <john@darrington.wattle.id.au>
+
+ clean-temp: Fix memory leak.
+ * lib/clean-temp.c (cleanup_temp_dir): Free also the 'subdirs' and
+ 'files' members of tmpdir.
+
2012-07-27 Jim Meyering <meyering@redhat.com>
maint.mk: new rule: refresh-gnulib-patches
}
else
cleanup_list.tempdir_list[i] = NULL;
- /* Now only we can free the tmpdir->dirname and tmpdir itself. */
+ /* Now only we can free the tmpdir->dirname, tmpdir->subdirs,
+ tmpdir->files, and tmpdir itself. */
+ gl_list_free (tmpdir->files);
+ gl_list_free (tmpdir->subdirs);
free (tmpdir->dirname);
free (tmpdir);
return err;