From: Christian Grothoff Date: Thu, 4 Jan 2018 20:43:39 +0000 (+0100) Subject: fix UDP memory leak X-Git-Tag: gnunet-0.11.0rc0~16^2~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d7d5c67e4f3029047c81e85340c5e4d99033514c;p=oweals%2Fgnunet.git fix UDP memory leak --- 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))