Mercurial > dovecot > core-2.2
changeset 20661:aa1ac716269e
lib-master: Check for NULL in input/output
Makes static analysers happy
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Tue, 16 Aug 2016 14:47:35 +0300 |
parents | 05ae6a4d8947 |
children | ff456e22d98b |
files | src/lib-master/master-login-auth.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-master/master-login-auth.c Tue Aug 16 14:46:08 2016 +0300 +++ b/src/lib-master/master-login-auth.c Tue Aug 16 14:47:35 2016 +0300 @@ -109,8 +109,10 @@ 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;