summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-10-22 10:29:31 +0200
committerraveit65 <[email protected]>2022-01-29 15:00:59 +0100
commit1aa50457dce4d00cde74f65ea41f59ab1fdfb659 (patch)
treeb8bfe4cf45f6fc3add2ad751d76afd8c7ab5e3d3 /src
parentdb168aad4c8c06c8a8c3c2fe712050435665f103 (diff)
downloadengrampa-1aa50457dce4d00cde74f65ea41f59ab1fdfb659.tar.bz2
engrampa-1aa50457dce4d00cde74f65ea41f59ab1fdfb659.tar.xz
fr-command-tar: fix memory leak
Diffstat (limited to 'src')
-rw-r--r--src/fr-command-tar.c9
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]);