mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
LINUX: you dont need to memset() after allocating credentials
If you wanted to create a blank credential, you wouldn't want to make it uid = 0. Anyone allocating a credential SHOULD properly fill in all fields making this blanking operation moot. Regardless, this memset() is before the allocation failure test and would/could panic. Change-Id: Ia182a874a5e1bf28a2cd94898f67d81e5588d58c Reviewed-on: http://gerrit.openafs.org/1080 Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
4b3f3169cb
commit
7d69cfbc20
@ -35,7 +35,6 @@ crget(void)
|
||||
cred_t *tmp;
|
||||
|
||||
tmp = kmalloc(sizeof(cred_t), GFP_NOFS);
|
||||
memset(tmp, 0, sizeof(cred_t));
|
||||
if (!tmp)
|
||||
osi_Panic("crget: No more memory for creds!\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user