diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-22 11:35:27 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-22 11:35:27 +0200 |
commit | 37ae9c186d56eaf85af700cc6beb2130ff267d01 (patch) | |
tree | 01f421b65fbded48be2118bcc08f2f1a881dcc54 | |
parent | 362baf7c95404f06da0fdb14802821bff724d690 (diff) |
Fix resource leak in compare_dir_entries error path
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r-- | difftool/compare_dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/difftool/compare_dir.c b/difftool/compare_dir.c index 9ef2ba5..99a0a37 100644 --- a/difftool/compare_dir.c +++ b/difftool/compare_dir.c @@ -32,6 +32,7 @@ int compare_dir_entries(sqfsdiff_t *sd, tree_node_t *old, tree_node_t *new) S_ISREG(old_it->mode)) { if (extract_files(sd, old_it->data.file, NULL, path)) { + free(path); return -1; } } @@ -58,6 +59,7 @@ int compare_dir_entries(sqfsdiff_t *sd, tree_node_t *old, tree_node_t *new) S_ISREG(new_it->mode)) { if (extract_files(sd, NULL, new_it->data.file, path)) { + free(path); return -1; } } |