From bd86b25e03b8409eb2d68788dabecd8dd757dc3c Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Tue, 16 Aug 2016 14:47:35 +0300 Subject: [PATCH] lib-master: Check for NULL in input/output Makes static analysers happy --- src/lib-master/master-login-auth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.47.3