mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-14 15:30:43 +00:00
odb: handle NULL pointers passed to git_odb_stream_free
Signed-off-by: Brodie Rao <brodie@sf.io>
This commit is contained in:
parent
e3c6a1bf02
commit
ae3b6d612d
@ -949,6 +949,9 @@ int git_odb_stream_read(git_odb_stream *stream, char *buffer, size_t len)
|
|||||||
|
|
||||||
void git_odb_stream_free(git_odb_stream *stream)
|
void git_odb_stream_free(git_odb_stream *stream)
|
||||||
{
|
{
|
||||||
|
if (stream == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
git__free(stream->hash_ctx);
|
git__free(stream->hash_ctx);
|
||||||
stream->free(stream);
|
stream->free(stream);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user