From 8776f194173bf688da9982845303c98da458fa3f Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Sun, 7 Aug 2011 00:09:33 -0400 Subject: [PATCH] afs_pioctl: don't use cell uninitialized in PGetTokens2 An unlikely error condition could lead to the variable cell in PGetTokens2 being passed uninitialized to afs_PutCell. Initialize it to NULL beforehand to avoid this. Change-Id: Ia8ded86df9d8af2f08c02d39749252d98a6c9ffe Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5168 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- src/afs/afs_pioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index ff3e87d21..38a9999a5 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -5380,7 +5380,7 @@ out: DECL_PIOCTL(PGetTokens2) { - struct cell *cell; + struct cell *cell = NULL; struct unixuser *tu = NULL; afs_int32 iterator; char *cellName = NULL; -- 2.39.5