]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: Check for NULL in input/output
authorAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 16 Aug 2016 11:47:35 +0000 (14:47 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 17 Aug 2016 15:24:17 +0000 (18:24 +0300)
Makes static analysers happy

src/lib-master/master-login-auth.c

index c28ff92e566a3dcddf6b2fb289e3e5643419b986..c8214ba7ac14f20066512ce5697beb79909ee8cf 100644 (file)
@@ -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;