Author: pschweitzer
Date: Thu Jul 25 15:04:56 2013
New Revision: 59581
URL:
http://svn.reactos.org/svn/reactos?rev=59581&view=rev
Log:
[CDMAKE]
Fix memory leak in dir_hash_add_file().
The duplicated targetnorm used for calling dir_hash_create_dir is never affected anywhere.
It is duplicated again before affectation. And thus,
leaks.
Modified:
trunk/reactos/tools/cdmake/dirhash.c
Modified: trunk/reactos/tools/cdmake/dirhash.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/dirhash.c?rev…
==============================================================================
--- trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] (original)
+++ trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] Thu Jul 25 15:04:56 2013
@@ -139,6 +139,7 @@
targetnorm = strdup(targetdir);
normalize_dirname(targetnorm);
de = dir_hash_create_dir(dh, targetdir, targetnorm);
+ free(targetnorm);
tf = calloc(1, sizeof(*tf));
tf->next = de->head;
de->head = tf;