From 16dac6d4a6c9b19588daf6f11fa33940a381e23c Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 18 Dec 2010 18:27:49 -0500 Subject: [PATCH] Fix fallback processing for ktc_GetTokenEx() The fallback processing after ktc_GetToken() generates a token set or fails. Immediately return 'code' to the caller after freeing ktcToken. Change-Id: If82c5c94b75152eaa4d077b428238e8f77478d05 Reviewed-on: http://gerrit.openafs.org/3544 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/auth/ktc.c | 1 + src/auth/ktc_nt.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/auth/ktc.c b/src/auth/ktc.c index a4ee59770e..25c2e37fac 100644 --- a/src/auth/ktc.c +++ b/src/auth/ktc.c @@ -523,6 +523,7 @@ ktc_GetTokenEx(char *cellName, struct ktc_setTokenData **tokenSet) { memset(ktcToken, 0, sizeof(struct ktc_token)); } free(ktcToken); + return code; } if (code) return KTC_PIOCTLFAIL; diff --git a/src/auth/ktc_nt.c b/src/auth/ktc_nt.c index b63c9bdf74..e5032bb74c 100644 --- a/src/auth/ktc_nt.c +++ b/src/auth/ktc_nt.c @@ -714,7 +714,7 @@ ktc_GetTokenEx(char *cellName, struct ktc_setTokenData **tokenSet) { memset(ktcToken, 0, sizeof(struct ktc_token)); } free(ktcToken); - return 0; + return code; } if (code) return KTC_PIOCTLFAIL;