Skip to content

Commit

Permalink
lib-smtp: smtp-server: Set pointer parameter of smtp_server_transacti…
Browse files Browse the repository at this point in the history
…on_free() to NULL immediately.
  • Loading branch information
stephanbosch committed Mar 2, 2019
1 parent 480483c commit 7141cd2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib-smtp/smtp-server-transaction.c
Expand Up @@ -74,6 +74,8 @@ void smtp_server_transaction_free(struct smtp_server_transaction **_trans)
struct smtp_server_connection *conn = trans->conn;
struct smtp_server_recipient **rcptp;

*_trans = NULL;

if (conn->callbacks != NULL &&
conn->callbacks->conn_trans_free != NULL)
conn->callbacks->conn_trans_free(conn->context, trans);
Expand All @@ -85,7 +87,6 @@ void smtp_server_transaction_free(struct smtp_server_transaction **_trans)

event_unref(&trans->event);
pool_unref(&trans->pool);
*_trans = NULL;
}

struct smtp_server_recipient *
Expand Down

0 comments on commit 7141cd2

Please sign in to comment.