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 <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
Jeffrey Altman 2010-12-18 18:27:49 -05:00 committed by Jeffrey Altman
parent f32a0df37b
commit 16dac6d4a6
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -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;