vendor/libgit2/src/pack-objects.c in rugged-0.99.0 vs vendor/libgit2/src/pack-objects.c in rugged-1.0.0
- old
+ new
@@ -372,10 +372,12 @@
} else {
zbuf = git__malloc(zbuf_len);
GIT_ERROR_CHECK_ALLOC(zbuf);
git_zstream_reset(&pb->zstream);
- git_zstream_set_input(&pb->zstream, data, data_len);
+
+ if ((error = git_zstream_set_input(&pb->zstream, data, data_len)) < 0)
+ goto done;
while (!git_zstream_done(&pb->zstream)) {
if ((error = git_zstream_get_output(zbuf, &zbuf_len, &pb->zstream)) < 0 ||
(error = write_cb(zbuf, zbuf_len, cb_data)) < 0 ||
(error = git_hash_update(&pb->ctx, zbuf, zbuf_len)) < 0)