mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-20 20:08:54 +00:00
Add error processing in git_blob_create_frombuffer()
This commit is contained in:
parent
411823a3d0
commit
1d1735fe03
@ -64,7 +64,10 @@ int git_blob_create_frombuffer(git_oid *oid, git_repository *repo, const void *b
|
||||
if ((error = git_odb_open_wstream(&stream, repo->db, len, GIT_OBJ_BLOB)) < GIT_SUCCESS)
|
||||
return error;
|
||||
|
||||
stream->write(stream, buffer, len);
|
||||
if ((error = stream->write(stream, buffer, len)) < GIT_SUCCESS) {
|
||||
stream->free(stream);
|
||||
return error;
|
||||
}
|
||||
|
||||
error = stream->finalize_write(oid, stream);
|
||||
stream->free(stream);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user