[ostree] commit: Fix segfault on async writes if object exists and checksum requested
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] commit: Fix segfault on async writes if object exists and checksum requested
- Date: Thu, 22 Jan 2015 13:38:06 +0000 (UTC)
commit 549f1ec7df58b9e9adcd25a0825f47fc71d2dd9e
Author: Colin Walters <walters verbum org>
Date: Wed Jan 21 21:16:11 2015 -0500
commit: Fix segfault on async writes if object exists and checksum requested
If an object already existed and we somehow tried to pull it, the
caller would still expect a returned checksum.
This appears to happen with static deltas for some reason; we might be
including duplicate metadata objects. Regardless, this is a bug that
should be fixed.
src/libostree/ostree-repo-commit.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c
index ca52704..a149c2e 100644
--- a/src/libostree/ostree-repo-commit.c
+++ b/src/libostree/ostree-repo-commit.c
@@ -478,6 +478,8 @@ write_object (OstreeRepo *self,
goto out;
if (have_obj)
{
+ if (out_csum)
+ *out_csum = ostree_checksum_to_bytes (expected_checksum);
ret = TRUE;
goto out;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]