lib/krb5: acc_resolve_2 leak if ccErrCacheNotFound

Fix the possible leak of 's' allocated by asprintf()

When squashing the changes reference "this fixes an issue introduced by 7bf4d76 ("krb5: Improve cccol sub naming; add gss_store_cred_into2()")" in the commit message.
This commit is contained in:
Jeffrey Altman
2020-11-05 11:47:42 -05:00
parent 68eba10cf1
commit 70ac849844

View File

@@ -560,7 +560,8 @@ acc_resolve_2(krb5_context context, krb5_ccache *id, const char *res, const char
if (error == ccErrCCacheNotFound) {
a->ccache = NULL;
a->cache_name = NULL;
return 0;
free(s);
return 0;
}
if (error == ccNoError)
error = get_cc_name(a);