Skip to content

Conversation

@amezin
Copy link
Contributor

@amezin amezin commented May 27, 2025

what

Don't jump over close()/free() calls. Release the resources correctly in all code paths.

why

Currently, there are memory, and, in case of Linux, socket leaks. goto end jumps over the calls that are supposed to release the memory/close the socket.

references

Initially discovered this on v2 - #3391 - but turns out the code is the same on v3 too.

@sonarqubecloud
Copy link

@airween
Copy link
Member

airween commented Jun 7, 2025

Hi @amezin,

nice catch, many thanks for this PR!

@airween airween merged commit 3150740 into owasp-modsecurity:v3/master Jun 7, 2025
50 checks passed
@airween airween added the 3.x Related to ModSecurity version 3.x label Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x Related to ModSecurity version 3.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants