Commit 072c92b1 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 062d26ad ad982c3b
...@@ -102,6 +102,7 @@ struct audit_fsnotify_mark *audit_alloc_mark(struct audit_krule *krule, char *pa ...@@ -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); ret = fsnotify_add_inode_mark(&audit_mark->mark, inode, 0);
if (ret < 0) { if (ret < 0) {
audit_mark->path = NULL;
fsnotify_put_mark(&audit_mark->mark); fsnotify_put_mark(&audit_mark->mark);
audit_mark = ERR_PTR(ret); audit_mark = ERR_PTR(ret);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment