Commit c19a3c7a by Edward Thomson

odb: check for write failures

parent d9863fc1
...@@ -1501,10 +1501,10 @@ int git_odb_write( ...@@ -1501,10 +1501,10 @@ int git_odb_write(
if ((error = git_odb_open_wstream(&stream, db, len, type)) != 0) if ((error = git_odb_open_wstream(&stream, db, len, type)) != 0)
return error; return error;
stream->write(stream, data, len); if ((error = stream->write(stream, data, len)) == 0)
error = stream->finalize_write(stream, oid); error = stream->finalize_write(stream, oid);
git_odb_stream_free(stream);
git_odb_stream_free(stream);
return error; return error;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment