Re: [PATCH v2] audit: fix a memory leak bug

2019-04-22 Thread Wenwen Wang
On Fri, Apr 19, 2019 at 2:28 PM Paul Moore wrote: > > On Fri, Apr 19, 2019 at 11:10 AM Wenwen Wang wrote: > > > > In audit_rule_change(), audit_data_to_entry() is firstly invoked to > > translate the payload data to the kernel's rule representation. In > > audi

[PATCH v3] audit: fix a memory leak bug

2019-04-22 Thread Wenwen Wang
, the default case of the switch statement, this temporary tree is not freed. To fix this issue, only allocate the tree when the type is AUDIT_ADD_RULE or AUDIT_DEL_RULE. Signed-off-by: Wenwen Wang --- kernel/auditfilter.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --

Re: [PATCH] audit: fix a memory leak bug

2019-04-22 Thread Wenwen Wang
On Thu, Apr 18, 2019 at 4:52 PM Paul Moore wrote: > > On Thu, Apr 18, 2019 at 1:39 PM Wenwen Wang wrote: > > In audit_rule_change(), audit_data_to_entry() is firstly invoked to > > translate the payload data to the kernel's rule representation. In > > audit_data

[PATCH v2] audit: fix a memory leak bug

2019-04-22 Thread Wenwen Wang
, the default case of the switch statement, this temporary tree is not freed. To fix this issue, only allocate the tree when the type is AUDIT_ADD_RULE or AUDIT_DEL_RULE. Signed-off-by: Wenwen Wang --- kernel/auditfilter.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff

[PATCH] audit: fix a memory leak bug

2019-04-22 Thread Wenwen Wang
, the default case of the switch statement, this temporary tree is not freed. To fix this issue, free the allocated tree in the default case. Signed-off-by: Wenwen Wang --- kernel/auditfilter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 63