diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-10-30 18:23:17 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-11-04 17:15:31 -0800 |
commit | 50225df61a261cd70123ee0d75e187c3b24061c2 (patch) | |
tree | e98c3f69c200a0ba8e44da5c031491afc8609564 | |
parent | 9a212bf37799e2899c0ca58a956487491e1786ff (diff) | |
download | libgit2-50225df61a261cd70123ee0d75e187c3b24061c2.tar.gz |
git: put NULL check at the top
-rw-r--r-- | src/transports/git.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/transports/git.c b/src/transports/git.c index 3e7e5a04f..6c6acf9c5 100644 --- a/src/transports/git.c +++ b/src/transports/git.c @@ -130,12 +130,15 @@ static int git_proto_stream_write( 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); + git_proto_stream *s; + git_subtransport *t; if (!stream) return; + s = (git_proto_stream *)stream; + t = OWNING_SUBTRANSPORT(s); + t->current_stream = NULL; git_stream_close(s->io); |