From: Philip Withnall Date: Thu, 21 Sep 2017 15:01:44 +0000 (+0100) Subject: lib/repo-pull: Fix a potential minor leak X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~31^2~23 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=030d2b1525a49c356210c18f57655afd9f474b4f;p=ostree.git lib/repo-pull: Fix a potential minor leak 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 Closes: #1202 Approved by: cgwalters --- diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 45e3eae5..cad7f86e 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -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