svn commit: samba r7508 - in branches/SAMBA_4_0/source/kdc: .

abartlet at samba.org abartlet at samba.org
Sun Jun 12 11:31:58 GMT 2005


Author: abartlet
Date: 2005-06-12 11:31:57 +0000 (Sun, 12 Jun 2005)
New Revision: 7508

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7508

Log:
Fix memory leak of outgoing packets in the KDC.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/kdc/kdc.c


Changeset:
Modified: branches/SAMBA_4_0/source/kdc/kdc.c
===================================================================
--- branches/SAMBA_4_0/source/kdc/kdc.c	2005-06-12 11:03:15 UTC (rev 7507)
+++ branches/SAMBA_4_0/source/kdc/kdc.c	2005-06-12 11:31:57 UTC (rev 7508)
@@ -122,12 +122,15 @@
 	/* queue a pending reply */
 	rep = talloc(kdc_socket, struct kdc_reply);
 	if (rep == NULL) {
+		krb5_data_free(&reply);
 		talloc_free(tmp_ctx);
 		return;
 	}
 	rep->dest_address = talloc_steal(rep, src_addr);
 	rep->dest_port    = src_port;
 	rep->packet       = data_blob_talloc(rep, reply.data, reply.length);
+	krb5_data_free(&reply);
+
 	if (rep->packet.data == NULL) {
 		talloc_free(rep);
 		talloc_free(tmp_ctx);



More information about the samba-cvs mailing list