Skip to content

Commit ae9d2fb

Browse files
committed
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>
1 parent aa7c043 commit ae9d2fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/auditfilter.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ static inline int audit_add_rule(struct audit_entry *entry)
861861
struct audit_watch *watch = entry->rule.watch;
862862
struct audit_tree *tree = entry->rule.tree;
863863
struct list_head *list;
864-
int err;
864+
int err = 0;
865865
#ifdef CONFIG_AUDITSYSCALL
866866
int dont_count = 0;
867867

0 commit comments

Comments
 (0)