mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:15:41 +00:00
[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. svn path=/trunk/; revision=59581
This commit is contained in:
parent
b5c485fb74
commit
0e19688298
1 changed files with 1 additions and 0 deletions
|
@ -139,6 +139,7 @@ void dir_hash_add_file(struct target_dir_hash *dh, const char *source, const cha
|
||||||
targetnorm = strdup(targetdir);
|
targetnorm = strdup(targetdir);
|
||||||
normalize_dirname(targetnorm);
|
normalize_dirname(targetnorm);
|
||||||
de = dir_hash_create_dir(dh, targetdir, targetnorm);
|
de = dir_hash_create_dir(dh, targetdir, targetnorm);
|
||||||
|
free(targetnorm);
|
||||||
tf = calloc(1, sizeof(*tf));
|
tf = calloc(1, sizeof(*tf));
|
||||||
tf->next = de->head;
|
tf->next = de->head;
|
||||||
de->head = tf;
|
de->head = tf;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue