Commit ae3b6d61 by Brodie Rao

odb: handle NULL pointers passed to git_odb_stream_free

Signed-off-by: Brodie Rao <brodie@sf.io>
parent e3c6a1bf
......@@ -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)
{
if (stream == NULL)
return;
git__free(stream->hash_ctx);
stream->free(stream);
}
......
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