lkml.org 
[lkml]   [2013]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] kernel: audit_watch: resource management: better reset to NULL.

better to set krule->watch = NULL.
maybe it is not a real issue, but can make code clearer,
so can help the readers to analyse another issues.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
kernel/audit_watch.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
index 22831c4..abd8fdb 100644
--- a/kernel/audit_watch.c
+++ b/kernel/audit_watch.c
@@ -456,6 +456,7 @@ void audit_remove_watch_rule(struct audit_krule *krule)

if (list_empty(&watch->rules)) {
audit_remove_watch(watch);
+ krule->watch = NULL;

if (list_empty(&parent->watches)) {
audit_get_parent(parent);
--
1.7.7.6

\
 
 \ /
  Last update: 2013-04-12 07:21    [W:0.419 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site