svn rev #24724: trunk/src/kdc/

ghudson@MIT.EDU ghudson at MIT.EDU
Thu Mar 17 18:10:44 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=24724
Commit By: ghudson
Log Message:
ticket: 6885
subject: KDC memory leak of reply padata for FAST replies
target_version: 1.9.1
tags: pullup

kdc_fast_response_handle_padata() replaces rep->padata, causing the
old value to be leaked.  As a minimal fix, free the old value of
rep->padata before replacing it.



Changed Files:
U   trunk/src/kdc/fast_util.c
Modified: trunk/src/kdc/fast_util.c
===================================================================
--- trunk/src/kdc/fast_util.c	2011-03-17 22:08:22 UTC (rev 24723)
+++ trunk/src/kdc/fast_util.c	2011-03-17 22:10:44 UTC (rev 24724)
@@ -338,6 +338,7 @@
         pa[0].length = encrypted_reply->length;
         pa[0].contents = (unsigned char *)  encrypted_reply->data;
         pa_array[0] = &pa[0];
+        krb5_free_pa_data(kdc_context, rep->padata);
         rep->padata = pa_array;
         pa_array = NULL;
         free(encrypted_reply);




More information about the cvs-krb5 mailing list