lib/pull: Fix a small leak when a variable is reused
authorPhilip Withnall <pwithnall@endlessos.org>
Mon, 21 Nov 2022 16:34:00 +0000 (16:34 +0000)
committerPhilip Withnall <pwithnall@endlessos.org>
Mon, 21 Nov 2022 16:34:00 +0000 (16:34 +0000)
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
src/libostree/ostree-repo-pull.c

index 86b4358a12579cb0c7117c939addc3cac83b97d6..9412f1e1f07f023542d08d2c03221ebe1fdf3ba7 100644 (file)
@@ -4712,6 +4712,7 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
             !load_remote_repo_config (pull_data, &remote_config, cancellable, error))
           goto out;
 
+        g_clear_pointer (&remote_mode_str, g_free);
         if (!ot_keyfile_get_value_with_default (remote_config, "core", "mode", "bare",
                                                 &remote_mode_str, error))
           goto out;