Skip to content
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

conf: init parser after check with stat() - 70x backport - v1 #12002

Closed

Conversation

jufajardini
Copy link
Contributor

Commit changes are made to avoid possible memory leaks. If the parser is initialized before configuration file checking, there was no deinit call before function return. Do check config file existance and type before YAML parser initialization, so we don't need to deinit parser before exiting the function.

Bug: #7302
(cherry picked from commit 87e6e93)

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
original - https://redmine.openinfosecfoundation.org/issues/7302
backport - https://redmine.openinfosecfoundation.org/issues/7308

Describe changes:

Commit changes are made to avoid possible memory leaks. If the parser
is initialized before configuration file checking, there was no deinit
call before function return. Do check config file existance and type
before YAML parser initialization, so we don't need to deinit parser
before exiting the function.

Bug: OISF#7302
(cherry picked from commit 87e6e93)
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 83.31%. Comparing base (8810d7f) to head (931a2e5).
Report is 2 commits behind head on main-7.0.x.

Additional details and impacted files
@@              Coverage Diff               @@
##           main-7.0.x   #12002      +/-   ##
==============================================
+ Coverage       82.93%   83.31%   +0.38%     
==============================================
  Files             922      922              
  Lines          251298   260802    +9504     
==============================================
+ Hits           208418   217292    +8874     
- Misses          42880    43510     +630     
Flag Coverage Δ
fuzzcorpus 64.61% <0.00%> (+0.50%) ⬆️
suricata-verify 63.28% <33.33%> (+0.43%) ⬆️
unittests 62.38% <0.00%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 23144

@victorjulien
Copy link
Member

Merged in #12005, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants