]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Fix crash if imap-hibernate socket can't be connected to
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 24 Aug 2020 13:58:16 +0000 (16:58 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 4 Jan 2021 22:59:38 +0000 (00:59 +0200)
The error was supposed to be returned to caller, not logged directly.

src/imap/imap-client-hibernate.c

index 4ef323453c36efd85c60705be9907f3bf0792c69..d3451b1bf626e5485bed67e20f36fad4f68690fa 100644 (file)
@@ -176,7 +176,8 @@ imap_hibernate_process_send(struct client *client, const buffer_t *state,
                           "/"IMAP_HIBERNATE_SOCKET_NAME, NULL);
        fd = net_connect_unix_with_retries(path, 1000);
        if (fd == -1) {
-               e_error(client->event, "net_connect_unix(%s) failed: %m", path);
+               *error_r = t_strdup_printf(
+                       "net_connect_unix(%s) failed: %m", path);
                return -1;
        }
        net_set_nonblock(fd, FALSE);