Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d39f643

Browse files
committed
stream: accept NULL in the free function
1 parent d07c9f4 commit d39f643

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/stream.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ GIT_INLINE(int) git_stream_close(git_stream *st)
6262

6363
GIT_INLINE(void) git_stream_free(git_stream *st)
6464
{
65+
if (!st)
66+
return;
67+
6568
st->free(st);
6669
}
6770

0 commit comments

Comments
 (0)