From c9e507f231eb130ecd0d2e3abdd8d9b1d6d3b8b4 Mon Sep 17 00:00:00 2001 From: Olga Kornievskaia Date: Wed, 18 May 2011 18:07:56 -0400 Subject: [PATCH] fixed memory if AcquireCred fails if mount -o sec=krb5 fails because the user doesn't have kerberos credentials, we were not freeing memory allocated for sec context. --- libtirpc/src/auth_sspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libtirpc/src/auth_sspi.c b/libtirpc/src/auth_sspi.c index 3d21bdb..bbe97a9 100644 --- a/libtirpc/src/auth_sspi.c +++ b/libtirpc/src/auth_sspi.c @@ -164,7 +164,8 @@ authsspi_create_default(CLIENT *clnt, char *service, int svc) NULL, NULL, NULL, NULL, &sec->cred, &sec->expiry); if (maj_stat != SEC_E_OK) { log_debug("authgss_create_default: AcquireCredentialsHandleA failed with %x", maj_stat); - goto out_free_sec; + free(sec); + goto out; } auth = authsspi_create(clnt, name, sec);