diff options
author | Dan Carpenter <error27@gmail.com> | 2010-03-22 09:07:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-22 12:57:19 -0400 |
commit | 99b437a9257cb6b267bf32adfb7675948dc6d485 (patch) | |
tree | 21173f7d22026bf37455cc7baa32e71acff82e8c /fs/afs | |
parent | 45575f5a426c01ec68cd33d998267ba2f6278fac (diff) |
AFS: Potential null dereference
It seems clear from the surrounding code that xpermits is allowed to be
NULL here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/afs')
-rw-r--r-- | fs/afs/security.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/afs/security.c b/fs/afs/security.c index 3ef504370034..bb4ed144d0e4 100644 --- a/fs/afs/security.c +++ b/fs/afs/security.c | |||
@@ -189,8 +189,9 @@ void afs_cache_permit(struct afs_vnode *vnode, struct key *key, long acl_order) | |||
189 | if (!permits) | 189 | if (!permits) |
190 | goto out_unlock; | 190 | goto out_unlock; |
191 | 191 | ||
192 | memcpy(permits->permits, xpermits->permits, | 192 | if (xpermits) |
193 | count * sizeof(struct afs_permit)); | 193 | memcpy(permits->permits, xpermits->permits, |
194 | count * sizeof(struct afs_permit)); | ||
194 | 195 | ||
195 | _debug("key %x access %x", | 196 | _debug("key %x access %x", |
196 | key_serial(key), vnode->status.caller_access); | 197 | key_serial(key), vnode->status.caller_access); |