summaryrefslogtreecommitdiff
path: root/lib/krb5.c
diff options
context:
space:
mode:
authorJulien Chaffraix <julien.chaffraix@gmail.com>2010-09-26 22:44:42 -0700
committerJulien Chaffraix <julien.chaffraix@gmail.com>2010-09-28 22:05:24 -0700
commit87badbef846c29359f2981076d53acd108b57254 (patch)
treeadc5bf60fa2fb04cd08eab05a887286276536122 /lib/krb5.c
parente3811ed7c34ed1818dc246af54460fea0fc52c02 (diff)
downloadcurl-87badbef846c29359f2981076d53acd108b57254.tar.gz
krb5-gssapi: Remove several memory leaks.
Remove a leak seen on Kerberos/MIT (gss_OID is copied internally and we were leaking it). Now we just pass NULL as advised in RFC2744. |tmp| was never set back to buf->data. Cleaned up Curl_sec_end to take into account failure in Curl_sec_login (where conn->mech would be NULL but not conn->app_data or conn->in_buffer->data).
Diffstat (limited to 'lib/krb5.c')
-rw-r--r--lib/krb5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/krb5.c b/lib/krb5.c
index 9fb44f2d7..28c6a2528 100644
--- a/lib/krb5.c
+++ b/lib/krb5.c
@@ -218,8 +218,8 @@ krb5_auth(void *app_data, struct connectdata *conn)
continue;
}
{
- gss_OID t;
- gss_display_name(&min, gssname, &gssbuf, &t);
+ /* We pass NULL as |output_name_type| to avoid a leak. */
+ gss_display_name(&min, gssname, &gssbuf, NULL);
Curl_infof(data, "Trying against %s\n", gssbuf.value);
gss_release_buffer(&min, &gssbuf);
}