From ad4adb4aa2e458b744474931b0458d2146fb6f3a Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 9 Feb 2010 16:26:57 +0000 Subject: [PATCH] Initialise ptuser to NULL Fix fallout from d008089a79ef268bbca91d660a840f32cb416865 - sc wasn't being initialised when it was declared, and some code paths would fail to set it. This led to the == NULL check failing, and a new rx connection being created with an invalid pointer as a security context. Disaster ensued ... Change-Id: Ibae3c72408d1145bc771bd07e573427d9f427679 Reviewed-on: http://gerrit.openafs.org/1277 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/ptserver/ptuser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ptserver/ptuser.c b/src/ptserver/ptuser.c index fd889333a..c4969699e 100644 --- a/src/ptserver/ptuser.c +++ b/src/ptserver/ptuser.c @@ -62,7 +62,7 @@ pr_Initialize(IN afs_int32 secLevel, IN const char *confDir, IN char *cell) { afs_int32 code; struct rx_connection *serverconns[MAXSERVERS]; - struct rx_securityClass *sc; + struct rx_securityClass *sc = NULL; static struct afsconf_dir *tdir = (struct afsconf_dir *)NULL; /* only do this once */ static char tconfDir[100] = ""; static char tcell[64] = ""; -- 2.39.5