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

dbparser: fix memory leak #2311

Merged
merged 1 commit into from Sep 26, 2018
Merged

dbparser: fix memory leak #2311

merged 1 commit into from Sep 26, 2018

Conversation

bodnartibi
Copy link
Contributor

We leaked the patterndb file after every reload

Signed-off-by: Tibor Bodnar tibor.bodnar@balabit.com

We leaked the patterndb file after every reload

Signed-off-by: Tibor Bodnar <tibor.bodnar@balabit.com>
@kira-syslogng
Copy link
Contributor

Build SUCCESS

@Kokan Kokan merged commit 04ba461 into syslog-ng:master Sep 26, 2018
@bodnartibi bodnartibi deleted the fix-dbparser-mem-leak branch September 26, 2018 14:06
@lbudai lbudai added this to the OSE 3.18 milestone Sep 28, 2018
furiel added a commit to furiel/syslog-ng that referenced this pull request Mar 31, 2019
There was earlier a memory leak in pattern-db: the rules in
patterndb were leaked. This was attempted to be fixed in
syslog-ng#2311. However the fix was
incomplete, the last rule was still not be freed.

The problem was in the end element logic: due to the `== 0`, the
pdb_rule_unref was called only in case of parse error. Hence rule was
never freed at the `</rule>` end element.

This patch reverts syslog-ng#2311, and
fixes the return value problem.

Signed-off-by: Antal Nemes <antal.nemes@balabit.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants