Skip to content

Commit

Permalink
lib/repo-pull: Fix a potential minor leak
Browse files Browse the repository at this point in the history
If override-remote-name is specified in the options to
ostree_repo_pull_with_options(), but the remote_name_or_baseurl argument
is also set to a remote name, the override-remote-name would be leaked.

Note that this is currently an invalid configuration, so this leak is
basically never hit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #1202
Approved by: cgwalters
  • Loading branch information
pwithnall authored and rh-atomic-bot committed Sep 27, 2017
1 parent c6f9724 commit 030d2b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libostree/ostree-repo-pull.c
Expand Up @@ -3360,6 +3360,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
{
g_autofree char *unconfigured_state = NULL;

g_free (pull_data->remote_name);
pull_data->remote_name = g_strdup (remote_name_or_baseurl);

/* Fetch GPG verification settings from remote if it wasn't already
Expand Down

0 comments on commit 030d2b1

Please sign in to comment.