From 949c6518454818d41f39b5d125bf05b7416bcb88 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Thu, 27 Aug 2020 03:52:49 +1000 Subject: [PATCH] Avoid leaking memory if the buffer is uncompressable --- src/edge_utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/edge_utils.c b/src/edge_utils.c index bbd9dc4..7f309bf 100644 --- a/src/edge_utils.c +++ b/src/edge_utils.c @@ -1600,6 +1600,9 @@ void edge_send_packet2net(n2n_edge_t * eee, memcpy (tap_pkt, compression_buffer, compression_len); len = compression_len; + } + + if(compression_buffer) { free (compression_buffer); } }