Skip to content

Commit 585210a

Browse files
authored
Merge pull request libgit2#6836 from gensmusic/main
odb: conditional git_hash_ctx_cleanup in git_odb_stream
2 parents bfe5cb5 + c3e76dd commit 585210a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libgit2/odb.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1796,7 +1796,8 @@ void git_odb_stream_free(git_odb_stream *stream)
17961796
if (stream == NULL)
17971797
return;
17981798

1799-
git_hash_ctx_cleanup(stream->hash_ctx);
1799+
if (stream->hash_ctx)
1800+
git_hash_ctx_cleanup(stream->hash_ctx);
18001801
git__free(stream->hash_ctx);
18011802
stream->free(stream);
18021803
}

0 commit comments

Comments
 (0)