New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix memleaks in BSD syscollector #3795
Conversation
Scan-build outputPrevious bugs
These errors disappear in scan-build reports of this branch. |
AddressSanitizerPrevious output
Tested on this branch, AddressSanitizer doesn't report any memory issue. |
Leaks toolFor these tests, the Syscollector interval is one minute. Results for the previous version (3.9 branch) The summary reports several leaks in
As we can see, the content of the leaked memory contains parts of the data reported in the package inventory, the serial board, and the agent IP. The three modules where the memory leaks were found.
In addition, after successive Syscollector scans, the ammount of memory leaks grow.
Results when applying the fixes (tmp-scanbuild-mac branch) Here the summary of the
We can see in the fields |
Description
This PR fixes several memory leaks, some of them cherry-picked from #3773 and #3785.
Most of this leaks aren't detected by Memcheck.
Tests