aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/update.c')
-rw-r--r--src/update.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/update.c b/src/update.c
index 9a2a2ceb9..bdf84ce36 100644
--- a/src/update.c
+++ b/src/update.c
@@ -430,7 +430,7 @@ update_container_file( struct directory* directory,
{
char* vtrack = NULL;
unsigned int tnum = 0;
- const char* pathname = map_directory_child_fs(directory, name);
+ char* pathname = map_directory_child_fs(directory, name);
struct directory* contdir = dirvec_find(&directory->children, name);
// directory exists already
@@ -446,8 +446,10 @@ update_container_file( struct directory* directory,
modified = true;
}
- else
+ else {
+ g_free(pathname);
return true;
+ }
}
contdir = make_subdir(directory, name);
@@ -473,6 +475,8 @@ update_container_file( struct directory* directory,
g_free(vtrack);
}
+ g_free(pathname);
+
if (tnum == 1)
{
delete_directory(contdir);