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.
This commit is contained in:
Colin Walters 2015-01-21 21:16:11 -05:00
parent 28e5e6f27f
commit 549f1ec7df
1 changed files with 2 additions and 0 deletions

View File

@ -478,6 +478,8 @@ write_object (OstreeRepo *self,
goto out; goto out;
if (have_obj) if (have_obj)
{ {
if (out_csum)
*out_csum = ostree_checksum_to_bytes (expected_checksum);
ret = TRUE; ret = TRUE;
goto out; goto out;
} }