Skip to content

Commit

Permalink
src/bundle: fix string leakage in casync_make_arch()
Browse files Browse the repository at this point in the history
The tmpdir holds a string newly allocated by g_dir_make_tmp().
Thus it must be freed. Use g_autofree for that.

Signed-off-by: Enrico Joerns <[email protected]>
  • Loading branch information
ejoerns committed Jul 15, 2024
1 parent f5a8ebd commit 0299d72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static gboolean casync_make_arch(const gchar *idxpath, const gchar *contentpath,
gboolean res = FALSE;
g_autoptr(GPtrArray) args = g_ptr_array_new_full(5, g_free);
g_autoptr(GPtrArray) iargs = g_ptr_array_new_full(15, g_free);
const gchar *tmpdir = NULL;
g_autofree gchar *tmpdir = NULL;

g_return_val_if_fail(idxpath != NULL, FALSE);
g_return_val_if_fail(contentpath != NULL, FALSE);
Expand Down

0 comments on commit 0299d72

Please sign in to comment.