lib: Fix memory leaks of OstreeRemote

The _ostree_repo_get_remote() and _ostree_repo_get_remote_inherited()
methods transfer ownership of the returned OstreeRemote to the caller,
so this commit fixes a few call sites that weren't properly freeing it.

Closes: #1478
Approved by: cgwalters
This commit is contained in:
Matthew Leeds authored and Atomic Bot committed 2018-03-05 20:00:16 +00:00
1 parent 79d6f635df
commit fe6ae92ebc
3 files changed
+6 -6

No files matched your search

+2 -1
View File
@@ -30,6 +30,7 @@
#include <glib-object.h>
#include <libglnx.h>
#include "ostree-autocleanups.h"
#include "ostree-remote-private.h"
#include "ostree-repo.h"
#include "ostree-repo-private.h"
@@ -176,7 +177,7 @@ ostree_repo_finder_config_resolve_async (OstreeRepoFinder *find
while (g_hash_table_iter_next (&iter, (gpointer *) &remote_name, (gpointer *) &supported_ref_to_checksum))
{
g_autoptr(GError) local_error = NULL;
OstreeRemote *remote;
g_autoptr(OstreeRemote) remote = NULL;
/* We don’t know what last-modified timestamp the remote has without
* making expensive HTTP queries, so leave that information blank. We