Skip to content

Fix memory leak in AuditLog::init() #1897

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

Closed
wants to merge 1 commit into from

Conversation

weliu
Copy link

@weliu weliu commented Sep 12, 2018

This was found by valgrind:

==17964== 576 bytes in 24 blocks are definitely lost in loss record 71 of 79
==17964== at 0x4C2A243: operator new(unsigned long) (vg_replace_malloc.c:334)
==17964== by 0x4F3CC86: modsecurity::audit_log::AuditLog::init(std::string*) (audit_log.cc:222)
==17964== by 0x4F43AF4: modsecurity::RulesProperties::mergeProperties(modsecurity::RulesProperties*, modsecurity::RulesProperties*, std::basic_ostringstream<char, std::char_traits, std::allocator >) (rules_properties.h:395)
==17964== by 0x4F42B5A: modsecurity::Rules::loadFromUri(char const
) (rules.cc:104)
==17964== by 0x4F42C42: msc_rules_add_file (rules.cc:336)
==17964== by 0x400E65: main (test.c:114)

@zimmerle zimmerle self-assigned this Sep 12, 2018
@zimmerle zimmerle self-requested a review September 12, 2018 04:33
@zimmerle zimmerle added the 3.x Related to ModSecurity version 3.x label Sep 12, 2018
@zimmerle zimmerle added this to the v3.0.3 milestone Sep 12, 2018
zimmerle pushed a commit that referenced this pull request Oct 16, 2018
@victorhora
Copy link
Contributor

Merged as of 83d156b. Thanks for your contribution :)

@victorhora victorhora closed this Oct 17, 2018
@weliu weliu deleted the fix_memleak branch October 18, 2018 01:18
zimmerle pushed a commit that referenced this pull request Oct 18, 2018
zimmerle pushed a commit that referenced this pull request Oct 23, 2018
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 pr available
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants