/* Temporary directories and temporary files with automatic cleanup.
- Copyright (C) 2001, 2003, 2006-2007, 2009-2012 Free Software Foundation,
+ Copyright (C) 2001, 2003, 2006-2007, 2009-2013 Free Software Foundation,
Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
}
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;