Commit 99b437a9 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Torvalds

AFS: Potential null dereference

It seems clear from the surrounding code that xpermits is allowed to be
NULL here.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 45575f5a
...@@ -189,6 +189,7 @@ void afs_cache_permit(struct afs_vnode *vnode, struct key *key, long acl_order) ...@@ -189,6 +189,7 @@ void afs_cache_permit(struct afs_vnode *vnode, struct key *key, long acl_order)
if (!permits) if (!permits)
goto out_unlock; goto out_unlock;
if (xpermits)
memcpy(permits->permits, xpermits->permits, memcpy(permits->permits, xpermits->permits,
count * sizeof(struct afs_permit)); count * sizeof(struct afs_permit));
......
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