Skip to content

Commit

Permalink
stream: accept NULL in the free function
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmn committed Nov 3, 2015
1 parent d07c9f4 commit d39f643
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stream.h
Expand Up @@ -62,6 +62,9 @@ GIT_INLINE(int) git_stream_close(git_stream *st)

GIT_INLINE(void) git_stream_free(git_stream *st)
{
if (!st)
return;

st->free(st);
}

Expand Down

0 comments on commit d39f643

Please sign in to comment.