]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp proxy: Crashfix.
authorTimo Sirainen <tss@iki.fi>
Tue, 2 Mar 2010 09:19:32 +0000 (11:19 +0200)
committerTimo Sirainen <tss@iki.fi>
Tue, 2 Mar 2010 09:19:32 +0000 (11:19 +0200)
--HG--
branch : HEAD

src/lmtp/lmtp-proxy.c

index 7a4ad635b328016783153c0213fd14ab303b7bfc..0eefff1df6df49706f8e9bc3308c7dd4276b25fa 100644 (file)
@@ -100,6 +100,8 @@ void lmtp_proxy_deinit(struct lmtp_proxy **_proxy)
                o_stream_unref(&proxy->client_output);
        if (proxy->to_data_idle != NULL)
                timeout_remove(&proxy->to_data_idle);
+       if (proxy->to_finish != NULL)
+               timeout_remove(&proxy->to_finish);
        if (proxy->to != NULL)
                timeout_remove(&proxy->to);
        if (proxy->io != NULL)
@@ -191,7 +193,9 @@ static void lmtp_proxy_finish(struct lmtp_proxy *proxy)
 static void lmtp_proxy_try_finish(struct lmtp_proxy *proxy)
 {
        if (lmtp_proxy_send_data_replies(proxy) &&
-           (proxy->data_input->eof || proxy->data_input->stream_errno != 0 ||
+           (proxy->data_input == NULL ||
+            proxy->data_input->eof ||
+            proxy->data_input->stream_errno != 0 ||
             proxy->input_timeout))
                lmtp_proxy_finish(proxy);
 }