]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: proxy: Fix bad error handling code path with assert
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 20 Jan 2022 17:23:43 +0000 (18:23 +0100)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Sun, 30 Jan 2022 10:03:50 +0000 (10:03 +0000)
src/lmtp/lmtp-proxy.c

index 8c1cb16684ad4209b9c3b293e86f27b3ecb0ff9c..0679dc398c5e7589a241877d7fbbcb115cd8d3e6 100644 (file)
@@ -560,8 +560,8 @@ lmtp_proxy_rcpt_parse_redirect(const struct smtp_reply *proxy_reply,
                               const char **host_r, struct ip_addr *ip_r,
                               in_port_t *port_r, const char **error_r)
 {
-       if (proxy_reply->text_lines == NULL)
-               return -1;
+       i_assert(proxy_reply->text_lines != NULL);
+
        return smtp_proxy_redirect_parse(*proxy_reply->text_lines, destuser_r,
                                         host_r, ip_r, port_r, error_r);
 }