mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
parser: fix regex parser leak on parsing failure
When the regex parser failed, the Chars objects created/used in rules charset and cset_chars would not be cleaned up properly and would leak. Closes #361 Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
parent
9bba464d93
commit
dcad01ccc3
1 changed files with 1 additions and 0 deletions
|
@ -72,6 +72,7 @@ static inline Chars* insert_char_range(Chars* cset, transchar a, transchar b)
|
|||
* parsing succeeds!
|
||||
*/
|
||||
%destructor { $$->release(); } expr terms0 terms qterm term
|
||||
%destructor { delete $$; } charset cset_chars
|
||||
|
||||
%%
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue