Skip to content

Commit

Permalink
cleanup: optimize connection freeing
Browse files Browse the repository at this point in the history
  • Loading branch information
catenacyber committed Mar 14, 2024
1 parent cce5d0f commit 39f6f6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions htp/htp_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ void htp_conn_destroy(htp_conn_t *conn) {
for (size_t i = 0, n = htp_list_size(conn->transactions); i < n; i++) {
htp_tx_t *tx = htp_list_get(conn->transactions, i);
if (tx != NULL) {
// nullify conn so as not to call htp_conn_remove_tx
// since we remove all txs
tx->conn = NULL;
htp_tx_destroy_incomplete(tx);
}
}
Expand Down

0 comments on commit 39f6f6a

Please sign in to comment.