dir_hash_add_file: don't leak targetdir (14000 bytes saved per run)

svn path=/trunk/; revision=61647
This commit is contained in:
Sylvain Petreolle 2014-01-16 18:36:32 +00:00
parent b1d778dfbb
commit eaf7dd435c

View file

@ -152,6 +152,7 @@ void dir_hash_add_file(struct target_dir_hash *dh, const char *source, const cha
normalize_dirname(targetnorm);
de = dir_hash_create_dir(dh, targetdir, targetnorm);
free(targetnorm);
free(targetdir);
tf = calloc(1, sizeof(*tf));
tf->next = de->head;
de->head = tf;