summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2015-01-21 21:16:11 -0500
committerColin Walters <walters@verbum.org>2015-01-21 21:17:47 -0500
commit549f1ec7df58b9e9adcd25a0825f47fc71d2dd9e (patch)
tree8956166a2e7579b06631c9940b327e175e303519
parent28e5e6f27fe1600ee5f48ea55264ed73285a2dd8 (diff)
downloadostree-549f1ec7df58b9e9adcd25a0825f47fc71d2dd9e.tar.gz
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.
-rw-r--r--src/libostree/ostree-repo-commit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c
index ca52704e..a149c2e0 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;
}