From d39f643a0a09336ad77f04b7037cbc1c486bdd50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Tue, 13 Oct 2015 19:34:07 +0200 Subject: [PATCH] stream: accept NULL in the free function --- src/stream.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stream.h b/src/stream.h index 43fcc3045..4692c7115 100644 --- a/src/stream.h +++ b/src/stream.h @@ -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); }