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:
Chas Williams - CONTRACTOR 2010-01-07 18:35:37 -05:00 committed by Derrick Brashear
parent 4b3f3169cb
commit 7d69cfbc20

View File

@ -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");