ostree_builtin_pull: consistently set free-function on refs_to_fetch

We are relying on the GPtrArray to free its contents, but we only
give it a free-function on one code path.

Found by valgrind memcheck.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #559
Approved by: cgwalters
This commit is contained in:
Simon McVittie 2016-10-30 14:12:02 +00:00 committed by Atomic Bot
parent 22ed96d23c
commit 213d5013ce
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ ostree_builtin_pull (int argc, char **argv, GCancellable *cancellable, GError **
else
{
char *ref_to_fetch;
refs_to_fetch = g_ptr_array_new ();
refs_to_fetch = g_ptr_array_new_with_free_func (g_free);
if (!ostree_parse_refspec (argv[1], &remote, &ref_to_fetch, error))
goto out;
/* Transfer ownership */