diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-10-30 17:51:50 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-10-30 17:51:50 +0100 |
commit | 45d295e08cc7bd8b2dc27ed88d067eff6991d5c8 (patch) | |
tree | e1a4a54ed1c7265dd5002c3ec4dc9faadb0ac02e | |
parent | fd74bd0842ed332e7a4f3e59e3238592540f157c (diff) | |
download | libgit2-45d295e08cc7bd8b2dc27ed88d067eff6991d5c8.tar.gz |
git: accept NULL as argument to its stream free
-rw-r--r-- | src/transports/git.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/transports/git.c b/src/transports/git.c index 52de92d09..3e7e5a04f 100644 --- a/src/transports/git.c +++ b/src/transports/git.c @@ -132,9 +132,9 @@ static void git_proto_stream_free(git_smart_subtransport_stream *stream) { git_proto_stream *s = (git_proto_stream *)stream; git_subtransport *t = OWNING_SUBTRANSPORT(s); - int ret; - GIT_UNUSED(ret); + if (!stream) + return; t->current_stream = NULL; |