Fix double free in ostree_repo_pull_with_options

Duplicate the commit checksum for expected_commit_sizes since it's also
used as a value in requested_refs_to_fetch.

https://bugzilla.gnome.org/show_bug.cgi?id=750366
This commit is contained in:
John Hiesey authored and Colin Walters committed 2015-06-05 17:27:38 -04:00
1 parent acf228e3c8
commit 4f6f97caf0
1 file changed
+1 -1
+1 -1
View File
@@ -2063,7 +2063,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
malloced_size = g_new0 (guint64, 1);
*malloced_size = commit_size;
g_hash_table_insert (pull_data->expected_commit_sizes, contents, malloced_size);
g_hash_table_insert (pull_data->expected_commit_sizes, g_strdup (contents), malloced_size);
}
else
{