From e0dc6167a773a295980653d2d505037d7dbad738 Mon Sep 17 00:00:00 2001 From: Alexandre Janniaux Date: Mon, 8 Feb 2021 15:02:54 +0100 Subject: [PATCH] hxxx_sei: fix memory leak on error --- modules/packetizer/hxxx_sei.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/packetizer/hxxx_sei.c b/modules/packetizer/hxxx_sei.c index 2ae5f66aa0..4ba18811ad 100644 --- a/modules/packetizer/hxxx_sei.c +++ b/modules/packetizer/hxxx_sei.c @@ -109,7 +109,10 @@ void HxxxParseSEI(const uint8_t *p_buf, size_t i_buf, p_t35[i_t35] = bs_read( &s, 8 ); if( bs_error( &s ) ) + { + free( p_t35 ); break; + } /* TS 101 154 Auxiliary Data and H264/AVC video */ if( i_t35 > 4 && p_t35[0] == 0xb5 /* United States */ )