From: Chas Williams - CONTRACTOR Date: Thu, 7 Jan 2010 23:35:37 +0000 (-0500) Subject: LINUX: you dont need to memset() after allocating credentials X-Git-Tag: openafs-devel-1_5_73_1~14 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7d69cfbc20f1354b1dd9094b5ad496c8beaa5c58;p=packages%2Fo%2Fopenafs.git 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 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/afs/LINUX/osi_cred.c b/src/afs/LINUX/osi_cred.c index 3a0988b0b..b40d86257 100644 --- a/src/afs/LINUX/osi_cred.c +++ b/src/afs/LINUX/osi_cred.c @@ -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");