summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hiesey <john@hiesey.com>2015-05-06 16:43:06 -0700
committerColin Walters <walters@verbum.org>2015-06-05 17:27:38 -0400
commit4f6f97caf0efcded268d3f4ffa7774fe34ff203f (patch)
treef4380685404e6af8624de86d1b17f605fab2d439 /src
parentacf228e3c81be91f86cd468401dd784a2246ae51 (diff)
downloadostree-4f6f97caf0efcded268d3f4ffa7774fe34ff203f.tar.gz
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
Diffstat (limited to 'src')
-rw-r--r--src/libostree/ostree-repo-pull.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index 608a7b4f..cf576b5a 100644
--- a/src/libostree/ostree-repo-pull.c
+++ b/src/libostree/ostree-repo-pull.c
@@ -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
{