summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-08-23 19:26:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-08-23 19:26:48 -0700
commit072c92b1b1ef69c0e4898a70194ec2df70b15cd8 (patch)
treee926397edfedaae0266e80af26f0b807e9ccf7c2 /kernel
parent062d26ad0b36829c0142e5b96a694f3cdb6eaa43 (diff)
parentad982c3be4e60c7d39c03f782733503cbd88fd2a (diff)
downloadlinux-072c92b1b1ef69c0e4898a70194ec2df70b15cd8.tar.gz
linux-072c92b1b1ef69c0e4898a70194ec2df70b15cd8.tar.bz2
linux-072c92b1b1ef69c0e4898a70194ec2df70b15cd8.zip
Merge tag 'audit-pr-20220823' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
Pull audit fix from Paul Moore: "A single fix for a potential double-free on a fsnotify error path" * tag 'audit-pr-20220823' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: fix potential double free on error path from fsnotify_add_inode_mark
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit_fsnotify.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/audit_fsnotify.c b/kernel/audit_fsnotify.c
index 6432a37ac1c9..c565fbf66ac8 100644
--- a/kernel/audit_fsnotify.c
+++ b/kernel/audit_fsnotify.c
@@ -102,6 +102,7 @@ struct audit_fsnotify_mark *audit_alloc_mark(struct audit_krule *krule, char *pa
ret = fsnotify_add_inode_mark(&audit_mark->mark, inode, 0);
if (ret < 0) {
+ audit_mark->path = NULL;
fsnotify_put_mark(&audit_mark->mark);
audit_mark = ERR_PTR(ret);
}