[ostree] Fix double free in ostree_repo_pull_with_options
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] Fix double free in ostree_repo_pull_with_options
- Date: Fri, 5 Jun 2015 21:34:06 +0000 (UTC)
commit 4f6f97caf0efcded268d3f4ffa7774fe34ff203f
Author: John Hiesey <john hiesey com>
Date: Wed May 6 16:43:06 2015 -0700
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
src/libostree/ostree-repo-pull.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index 608a7b4..cf576b5 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
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]