From 74249a8a3103c6c88de23cd9d915d2a38aab5128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joni=20R=C3=A4s=C3=A4nen?= Date: Mon, 26 Aug 2024 16:07:48 +0300 Subject: [PATCH] common: Free payload memory also if extension header is in use Seems like these two buffers are always different, so it should be safe to delete both. --- src/frame.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frame.cc b/src/frame.cc index 696f715a..5d91e387 100644 --- a/src/frame.cc +++ b/src/frame.cc @@ -52,7 +52,7 @@ rtp_error_t uvgrtp::frame::dealloc_frame(uvgrtp::frame::rtp_frame *frame) delete frame->ext; } - else if (frame->payload) + if (frame->payload) delete[] frame->payload; //UVG_LOG_DEBUG("Deallocating frame, type %u", frame->type);