Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
audit: fix potential double free on error path from fsnotify_add_inod…
…e_mark Audit_alloc_mark() assign pathname to audit_mark->path, on error path from fsnotify_add_inode_mark(), fsnotify_put_mark will free memory of audit_mark->path, but the caller of audit_alloc_mark will free the pathname again, so there will be double free problem. Fix this by resetting audit_mark->path to NULL pointer on error path from fsnotify_add_inode_mark(). Cc: [email protected] Fixes: 7b12932 ("fsnotify: Add group pointer in fsnotify_init_mark()") Signed-off-by: Gaosheng Cui <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Paul Moore <[email protected]>
- Loading branch information