]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: server: connection: Rely on i_stream_destroy(NULL) being a no-op.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Wed, 20 Jun 2018 13:54:21 +0000 (15:54 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 26 Jun 2018 19:12:58 +0000 (19:12 +0000)
src/lib-smtp/smtp-server-connection.c

index c8f2e67bfb3f3b808490a6dd8953b4f8bca6a4a8..86efefe03ba1c2ff82975128162684f313f012a2 100644 (file)
@@ -1332,8 +1332,7 @@ void smtp_server_connection_reset_state(struct smtp_server_connection *conn)
           BDAT LAST, clears all segments sent during that transaction and resets
           the session.
         */
-       if (conn->state.data_input != NULL)
-               i_stream_destroy(&conn->state.data_input);
+       i_stream_destroy(&conn->state.data_input);
        conn->state.data_chain = NULL;
 
        /* reset state */