mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
parser - fix more memory leaks
This patch fixes a few more parser memory leaks as identified by the simple valgrind test script. These mostly occur during cleanup of structs and classes and as such, don't represent very serious leaks for common usages of the parser. Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
* NOVELL (All rights reserved)
|
||||
*
|
||||
* Copyright (c) 2013
|
||||
* Canonical Ltd. (All rights reserved)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of version 2 of the GNU General Public
|
||||
* License published by the Free Software Foundation.
|
||||
@@ -874,6 +877,8 @@ void free_cod_entries(struct cod_entry *list)
|
||||
free(list->name);
|
||||
if (list->link_name)
|
||||
free(list->link_name);
|
||||
if (list->nt_name)
|
||||
free(list->nt_name);
|
||||
if (list->pat.regex)
|
||||
free(list->pat.regex);
|
||||
free(list);
|
||||
|
Reference in New Issue
Block a user