From d7d5c67e4f3029047c81e85340c5e4d99033514c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 4 Jan 2018 21:43:39 +0100 Subject: [PATCH] fix UDP memory leak --- src/transport/plugin_transport_udp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 1ff962544..f214e7be4 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -1631,6 +1631,7 @@ enqueue (struct Plugin *plugin, if (GNUNET_YES == session->in_destroy) { GNUNET_break (0); + GNUNET_free (udpw); return; } if (plugin->bytes_in_buffer > INT64_MAX - udpw->msg_size) @@ -1913,8 +1914,8 @@ enqueue_fragment (void *cls, udpw->qc = &qc_fragment_sent; udpw->qc_cls = plugin; GNUNET_memcpy (udpw->msg_buf, - msg, - msg_len); + msg, + msg_len); enqueue (plugin, udpw); if (session->address->address_length == sizeof (struct IPv4UdpAddress)) -- 2.25.1