Skip to content

Commit

Permalink
lib-smtp: server: command: Hold connection reference while calling re…
Browse files Browse the repository at this point in the history
…plied hook.
  • Loading branch information
stephanbosch committed Nov 1, 2018
1 parent 1d99b04 commit a882b18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib-smtp/smtp-server-command.c
Expand Up @@ -454,10 +454,11 @@ smtp_server_command_handle_reply(struct smtp_server_command *cmd)
{
struct smtp_server_connection *conn = cmd->context.conn;

smtp_server_connection_ref(conn);

smtp_server_command_replied(cmd);

/* submit reply */
smtp_server_connection_ref(conn);
switch (cmd->state) {
case SMTP_SERVER_COMMAND_STATE_NEW:
case SMTP_SERVER_COMMAND_STATE_PROCESSING:
Expand Down

0 comments on commit a882b18

Please sign in to comment.