Fix warning in add-remote if no summary.

We were always ref:ing the hashtable, so always allocate it.
This commit is contained in:
Alexander Larsson committed 2015-03-02 11:38:37 +01:00
1 parent 471cdba23e
commit e3d5c2d801
1 file changed
+2 -2
+2 -2
View File
@@ -582,6 +582,8 @@ ostree_repo_load_summary (const char *repository_url,
gs_unref_hashtable GHashTable *local_refs = NULL;
gs_free char *local_title = NULL;
local_refs = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
summary_url = g_build_filename (repository_url, "summary", NULL);
if (load_contents (summary_url, &bytes, cancellable, NULL))
{
@@ -591,8 +593,6 @@ ostree_repo_load_summary (const char *repository_url,
GVariantDict dict;
int i, n;
local_refs = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
summary = g_variant_new_from_bytes (OSTREE_SUMMARY_GVARIANT_FORMAT, bytes, FALSE);
ref_list = g_variant_get_child_value (summary, 0);
extensions = g_variant_get_child_value (summary, 1);