Commit 072c92b1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
	}