diff options
author | monsta <[email protected]> | 2014-11-04 14:46:43 +0300 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-19 15:42:44 +0100 |
commit | 4f7a774746b0957e8b62e41f27a82b543b6ccf5a (patch) | |
tree | fc5c761496151830a3bfae0388d905e7390b9842 /src/file-utils.c | |
parent | 9574a0925e764867c810c35bbff16ab0bae8c930 (diff) | |
download | engrampa-4f7a774746b0957e8b62e41f27a82b543b6ccf5a.tar.bz2 engrampa-4f7a774746b0957e8b62e41f27a82b543b6ccf5a.tar.xz |
don't leak memory
Diffstat (limited to 'src/file-utils.c')
-rw-r--r-- | src/file-utils.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/file-utils.c b/src/file-utils.c index 1491790..3b33480 100644 --- a/src/file-utils.c +++ b/src/file-utils.c @@ -953,7 +953,7 @@ gboolean is_temp_work_dir (const char *dir) { int i; - char *folder; + char *folder = NULL; if (strncmp (dir, "file://", 7) == 0) dir = dir + 7; @@ -961,16 +961,15 @@ is_temp_work_dir (const char *dir) return FALSE; for (i = 0; try_folder[i] != NULL; i++) { - folder = ith_temp_folder_to_try (i); if (strncmp (dir, folder, strlen (folder)) == 0) if (strncmp (dir + strlen (folder), "/.fr-", 5) == 0) { g_free (folder); return TRUE; } + g_free (folder); } - g_free (folder); return FALSE; } |