Skip to content

Commit 1d7506b

Browse files
authored
Merge pull request syslog-ng#5033 from HofiOne/rate-limit-parse-error-segfault-fix
Rate limit parse error segfault fix
2 parents 352099f + b99ba20 commit 1d7506b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

modules/rate-limit-filter/rate-limit-parser.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/*
22
* Copyright (c) 2021 One Identity
3+
* Copyright (c) 2024 Axoflow
4+
* Copyright (c) 2024 Attila Szakacs <[email protected]>
35
*
46
* This program is free software; you can redistribute it and/or modify it
57
* under the terms of the GNU General Public License version 2 as published
@@ -46,7 +48,7 @@ CfgParser rate_limit_filter_parser =
4648
.name = "rate-limit-filter",
4749
.keywords = rate_limit_filter_keywords,
4850
.parse = (gint (*)(CfgLexer *, gpointer *, gpointer)) rate_limit_filter_parse,
49-
.cleanup = (void (*)(gpointer)) log_pipe_unref,
51+
.cleanup = (void (*)(gpointer)) filter_expr_unref,
5052
};
5153

5254
CFG_PARSER_IMPLEMENT_LEXER_BINDING(rate_limit_filter_, RATE_LIMIT_FILTER_, FilterExprNode **)

news/bugfix-169.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
`rate-limit()`: Fixed a crash which occured on a config parse failure.
2+
3+
!!!! TODO: add `nivelus` to contributors in the newsfile.

0 commit comments

Comments
 (0)