Skip to content

Commit

Permalink
lib-master: ipc-client: Don't free command too early
Browse files Browse the repository at this point in the history
When multiple replies were received by IPC only the final reply should free
the command. This may have caused e.g. "doveadm proxy list" to crash.
Broken by 435f054
  • Loading branch information
sirainen committed Jan 25, 2019
1 parent 70a1f63 commit c462c55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib-master/ipc-client.c
Expand Up @@ -73,10 +73,10 @@ static void ipc_client_input_line(struct ipc_client *client, const char *line)
else
client->aborted_cmds_count--;
}
if (cmd != NULL) {
if (cmd != NULL)
cmd->callback(state, line, cmd->context);
if (state != IPC_CLIENT_CMD_STATE_REPLY)
i_free(cmd);
}
if (disconnect)
ipc_client_disconnect(client);
}
Expand Down

0 comments on commit c462c55

Please sign in to comment.