From 6b7999187e33d4f9ddc1d842f70b587a492de325 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 13 Jun 2003 05:17:41 +0000 Subject: [PATCH] make_ap_req_v1 leaks memory * init_sec_context.c (make_ap_req_v1): Free checksum_data if needed, to avoid leaking memory. Found by Kent Wu. ticket: new target_version: 1.3 tags: pullup component: krb5-libs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15618 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/ChangeLog | 5 +++++ src/lib/gssapi/krb5/init_sec_context.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index fdecc83dc..10f85ad88 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,8 @@ +2003-06-13 Tom Yu + + * init_sec_context.c (make_ap_req_v1): Free checksum_data if + needed, to avoid leaking memory. Found by Kent Wu. + 2003-05-13 Tom Yu * gssapi_krb5.h: Remove check for GSS_RFC_COMPLIANT_OIDS. diff --git a/src/lib/gssapi/krb5/init_sec_context.c b/src/lib/gssapi/krb5/init_sec_context.c index ed3631152..a95d3048a 100644 --- a/src/lib/gssapi/krb5/init_sec_context.c +++ b/src/lib/gssapi/krb5/init_sec_context.c @@ -316,6 +316,8 @@ make_ap_req_v1(context, ctx, cred, k_cred, chan_bindings, mech_type, token) code = 0; cleanup: + if (checksum_data && checksum_data->data) + krb5_free_data_contents(context, checksum_data); if (ap_req.data) krb5_free_data_contents(context, &ap_req); -- 2.26.2