Merge pull request #6836 from gensmusic/main

odb: conditional git_hash_ctx_cleanup in git_odb_stream
This commit is contained in:
Edward Thomson
2024-06-25 11:49:28 +01:00
committed by GitHub

View File

@@ -1796,7 +1796,8 @@ void git_odb_stream_free(git_odb_stream *stream)
if (stream == NULL)
return;
git_hash_ctx_cleanup(stream->hash_ctx);
if (stream->hash_ctx)
git_hash_ctx_cleanup(stream->hash_ctx);
git__free(stream->hash_ctx);
stream->free(stream);
}