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 committed 2015-01-21 21:17:47 -05:00
1 parent 28e5e6f27f
commit 549f1ec7df
1 file changed
+2
+2
View File
@@ -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;
}