diff options
author | rbuj <[email protected]> | 2021-10-22 10:29:31 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-01-29 15:00:59 +0100 |
commit | 1aa50457dce4d00cde74f65ea41f59ab1fdfb659 (patch) | |
tree | b8bfe4cf45f6fc3add2ad751d76afd8c7ab5e3d3 /src | |
parent | db168aad4c8c06c8a8c3c2fe712050435665f103 (diff) | |
download | engrampa-1aa50457dce4d00cde74f65ea41f59ab1fdfb659.tar.bz2 engrampa-1aa50457dce4d00cde74f65ea41f59ab1fdfb659.tar.xz |
fr-command-tar: fix memory leak
Diffstat (limited to 'src')
-rw-r--r-- | src/fr-command-tar.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fr-command-tar.c b/src/fr-command-tar.c index 4bfc32d..0452bb8 100644 --- a/src/fr-command-tar.c +++ b/src/fr-command-tar.c @@ -137,8 +137,13 @@ process_line (char *line, } g_free (name); name = g_filename_from_utf8 (fdata->original_path, -1, NULL, NULL, NULL); - if (name) - fdata->original_path = name; + if (name) { + if (fdata->free_original_path) + g_free (fdata->original_path); + fdata->original_path = g_strdup (name); + fdata->free_original_path = TRUE; + } + g_free (name); if (fields[1] != NULL) fdata->link = g_strdup (fields[1]); |