Skip to content

Conversation

martinhsv
Copy link
Contributor

This PR commits two of three issues originally submitted in #2580.

@liudongmiao
Copy link
Contributor

@martinhsv I suggest to avoid use:

if (transformations != NULL) { delete transformations; } 

It's confused to free memory of constructor argument.

In the similiar #2728, I use shared_ptr to avoid delete.

For virtual ~Rule, it's ok. I have explained other solutions too: #2728 (comment)

@martinhsv
Copy link
Contributor Author

@liudongmiao ,

This way of deleting the transactions vector has some disadvantages, but it is that way in this PR because:

  • that is how it was coded in the original PR, which this is replacing
  • this way is consistent with how 'actions' was already being handled
@martinhsv martinhsv merged commit 5d2b86c into owasp-modsecurity:v3/master Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants