[FFmpeg-devel] [PATCH 3/4] avformat/sbgdec: fix leak in sbg_read_header()

James Almer jamrial at gmail.com
Tue Jun 17 17:28:58 EEST 2025


On 6/17/2025 11:23 AM, Nicolas George wrote:
> Lidong Yan (HE12025-06-17):
>> In sbg_read_header(), if avformat_new_stream() failed, it returns
>> without cleanup, which may cause memory leaks. Replace return statement
>> with goto so that we would first clean up then return.
>>
>> Signed-off-by: Lidong Yan <502024330056 at smail.nju.edu.cn>
>> ---
>>   libavformat/sbgdec.c | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> LGTM, thanks.
> 
> Regards,

Pushed.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250617/b99f5c39/attachment.sig>


More information about the ffmpeg-devel mailing list