From ffe39e72185be73f59cdc285828dae7d8ce7a075 Mon Sep 17 00:00:00 2001 From: Kaian Date: Fri, 6 May 2022 11:01:24 +0200 Subject: [PATCH] hep: free fake frame data after packet creation #399 --- src/capture_eep.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/capture_eep.c b/src/capture_eep.c index b59fc4e..04543ed 100644 --- a/src/capture_eep.c +++ b/src/capture_eep.c @@ -675,6 +675,9 @@ capture_eep_receive_v2() packet_set_type(pkt, PACKET_SIP_UDP); packet_set_payload(pkt, payload, header.caplen); + // We don't longer require frame payload anymore, because adding the frame to packet clones its memory + sng_free(frame_payload); + // Store this packets in output file capture_dump_packet(pkt); @@ -857,6 +860,9 @@ capture_eep_receive_v3(const u_char *pkt, uint32_t size) packet_set_type(pkt_new, PACKET_SIP_UDP); packet_set_payload(pkt_new, payload, header.caplen); + // We don't longer require frame payload anymore, because adding the frame to packet clones its memory + sng_free(frame_payload); + // Store this packets in output file capture_dump_packet(pkt_new);