summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2015-08-05 11:19:45 -0400
committerPaul Moore <pmoore@redhat.com>2015-08-05 11:19:45 -0400
commitae9d2fb482fa48f637b6705e6fef6f7f999ec779 (patch)
tree657531e9d7852dd72d0029075a240e6c12cd1c69 /kernel
parentaa7c043d9783f538319e77deeae5d90ff5d6907b (diff)
downloadlinux-ae9d2fb482fa48f637b6705e6fef6f7f999ec779.tar.gz
linux-ae9d2fb482fa48f637b6705e6fef6f7f999ec779.tar.bz2
linux-ae9d2fb482fa48f637b6705e6fef6f7f999ec779.zip
audit: fix uninitialized variable in audit_add_rule()
As reported by the 0-Day testing service: kernel/auditfilter.c: In function 'audit_rule_change': >> kernel/auditfilter.c:864:6: warning: 'err' may be used uninit... int err; Cc: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditfilter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 4cb9b44f806e..83f6d298d234 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -861,7 +861,7 @@ static inline int audit_add_rule(struct audit_entry *entry)
struct audit_watch *watch = entry->rule.watch;
struct audit_tree *tree = entry->rule.tree;
struct list_head *list;
- int err;
+ int err = 0;
#ifdef CONFIG_AUDITSYSCALL
int dont_count = 0;