mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-14 15:30:43 +00:00
git: put NULL check at the top
This commit is contained in:
parent
45d295e08c
commit
e0be1d605f
@ -130,12 +130,15 @@ static int git_proto_stream_write(
|
|||||||
|
|
||||||
static void git_proto_stream_free(git_smart_subtransport_stream *stream)
|
static void git_proto_stream_free(git_smart_subtransport_stream *stream)
|
||||||
{
|
{
|
||||||
git_proto_stream *s = (git_proto_stream *)stream;
|
git_proto_stream *s;
|
||||||
git_subtransport *t = OWNING_SUBTRANSPORT(s);
|
git_subtransport *t;
|
||||||
|
|
||||||
if (!stream)
|
if (!stream)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
s = (git_proto_stream *)stream;
|
||||||
|
t = OWNING_SUBTRANSPORT(s);
|
||||||
|
|
||||||
t->current_stream = NULL;
|
t->current_stream = NULL;
|
||||||
|
|
||||||
git_stream_close(s->io);
|
git_stream_close(s->io);
|
||||||
|
Loading…
Reference in New Issue
Block a user