Unverified Commit da8138b0 by Edward Thomson Committed by GitHub

Merge pull request #4906 from QBobWatson/bugfix

Fix segfault in loose_backend__readstream
parents 8092c431 2f3c4b69
......@@ -1028,11 +1028,15 @@ static int loose_backend__readstream(
done:
if (error < 0) {
git_futils_mmap_free(&stream->map);
git_zstream_free(&stream->zstream);
git_hash_ctx_cleanup(hash_ctx);
git__free(hash_ctx);
git__free(stream);
if (stream) {
git_futils_mmap_free(&stream->map);
git_zstream_free(&stream->zstream);
git__free(stream);
}
if (hash_ctx) {
git_hash_ctx_cleanup(hash_ctx);
git__free(hash_ctx);
}
}
git_buf_dispose(&object_path);
......
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