summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-06-12 11:31:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:02 -0500
commit183cb2b939fe20041c71bf197a50415f1c570b31 (patch)
tree740f89a2b1e8bafb79880aba0ea32bc029115bd6 /source4
parent694488d29c29e858df7638952282225300ceb5b6 (diff)
downloadsamba-183cb2b939fe20041c71bf197a50415f1c570b31.tar.gz
samba-183cb2b939fe20041c71bf197a50415f1c570b31.tar.bz2
samba-183cb2b939fe20041c71bf197a50415f1c570b31.zip
r7508: Fix memory leak of outgoing packets in the KDC.
Andrew Bartlett (This used to be commit 6f7bb00c7e59444cde0c25b6f83e1c335d86ee32)
Diffstat (limited to 'source4')
-rw-r--r--source4/kdc/kdc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
index 172d971aa7..3232f31b39 100644
--- a/source4/kdc/kdc.c
+++ b/source4/kdc/kdc.c
@@ -122,12 +122,15 @@ static void kdc_recv_handler(struct kdc_socket *kdc_socket)
/* 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);