From: Aki Tuomi Date: Tue, 16 Aug 2016 11:47:35 +0000 (+0300) Subject: lib-master: Check for NULL in input/output X-Git-Tag: 2.2.26~340 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bd86b25e03b8409eb2d68788dabecd8dd757dc3c;p=thirdparty%2Fdovecot%2Fcore.git lib-master: Check for NULL in input/output Makes static analysers happy --- diff --git a/src/lib-master/master-login-auth.c b/src/lib-master/master-login-auth.c index c28ff92e56..c8214ba7ac 100644 --- a/src/lib-master/master-login-auth.c +++ b/src/lib-master/master-login-auth.c @@ -109,8 +109,10 @@ void master_login_auth_disconnect(struct master_login_auth *auth) if (auth->io != NULL) io_remove(&auth->io); if (auth->fd != -1) { - i_stream_destroy(&auth->input); - o_stream_destroy(&auth->output); + if (auth->input != NULL) + i_stream_destroy(&auth->input); + if (auth->output != NULL) + o_stream_destroy(&auth->output); net_disconnect(auth->fd); auth->fd = -1;