Mercurial > dovecot > core-2.2
changeset 23001:fb58bb0c8b85
lib-master: ipc-client - Fix crash on connect failure
Broken by b7ecba9d6d358569d367620f95e3817da99e0036, which relied on v2.3
behavior for timeout_remove().
author | Timo Sirainen <timo.sirainen@open-xchange.com> |
---|---|
date | Thu, 31 Jan 2019 14:07:19 +0200 |
parents | 88fe34445780 |
children | f71099c5f007 |
files | src/lib-master/ipc-client.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-master/ipc-client.c Wed Jan 16 01:00:22 2019 +0200 +++ b/src/lib-master/ipc-client.c Thu Jan 31 14:07:19 2019 +0200 @@ -128,7 +128,8 @@ static void ipc_client_disconnect(struct ipc_client *client) { - timeout_remove(&client->to_failed); + if (client->to_failed != NULL) + timeout_remove(&client->to_failed); ipc_client_abort_commands(client, "Disconnected"); if (client->fd == -1) @@ -167,7 +168,8 @@ static void ipc_client_cmd_connect_failed(struct ipc_client *client) { ipc_client_abort_commands(client, "ipc connect failed"); - timeout_remove(&client->to_failed); + if (client->to_failed != NULL) + timeout_remove(&client->to_failed); } struct ipc_client_cmd *