From 7d69cfbc20f1354b1dd9094b5ad496c8beaa5c58 Mon Sep 17 00:00:00 2001 From: Chas Williams - CONTRACTOR Date: Thu, 7 Jan 2010 18:35:37 -0500 Subject: [PATCH] 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 --- src/afs/LINUX/osi_cred.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/afs/LINUX/osi_cred.c b/src/afs/LINUX/osi_cred.c index 3a0988b0b3..b40d862571 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");