Message ID | 20200614223656.21338-23-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | c784fe8b867e42a1c8d2c48d7046e3e0cce7ec31 |
Headers | show
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id F19A644A534 for <patchwork@ffaux-bg.ffmpeg.org>; Mon, 15 Jun 2020 01:41:15 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DB39568B6F2; Mon, 15 Jun 2020 01:41:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EF3BF68B68B for <ffmpeg-devel@ffmpeg.org>; Mon, 15 Jun 2020 01:41:09 +0300 (EEST) Received: by mail-wr1-f65.google.com with SMTP id j10so15166492wrw.8 for <ffmpeg-devel@ffmpeg.org>; Sun, 14 Jun 2020 15:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EmZCwcV0Ai9E6ot03Kkc8KtT3aWTU2k6+1kVHlpdrsA=; b=I/Y/D1/7Iz3ITq9/OjSLiCjXqxXEes10ykOJXf7ELfaDNxwzyPCD4SU2ZFpGMQcEi3 vdIGsyH7iyErBD+MTYgKgxILOoqnk0vfpfqWlfZhwMCUWj3Eg7i1s3Zmmlt8EyYzEMl2 GycjFPCDaTzzco4NU/uHuRdldpR0MYprbTszwzaW8j9WsyFKwjl9pEEA3utIrt03cuHX KK8TDD8XIm6cXFdJGoDcS1skCl5k3jlpJyWsBUfpc4/8yZ1M2DIBVVFlnJP8LE/BEJun yMGOu7kbN3gUqsPtqsgMNPV73PabTX8upPSRCc0x13x/HGv2GDTkbfTUIyD1IW/gf4tV t2Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EmZCwcV0Ai9E6ot03Kkc8KtT3aWTU2k6+1kVHlpdrsA=; b=bryTPcwtkl/Xxlz021hC71rHamSU/wXOOaZsslJcZB+qjtsfi02Lcx3jjFwU3aa2Cr UO4S0m/wexF60JzJfunlFXzIxk7YhtSjPFLKCSIhrfk8PZ7VyY0WdTnCb6Lx64xEKoFo 7UQyTazFbJtX5OfJrusslU+WmRycGRaAIJwE834IyD1Zs54vA9cv/9eGdtKLFlh7gmO9 kk3pFR4HTmnIftlbmjAsgXtACWg59iZhU4Ks19ioVhUmCvDjSr646ZM6rE66QVVdvLaL HbEr1h8lDPmwawfaKpQpNS7ATNr4dyxEvOIxdzWT2kkz4rEhpsK0syepp1gnfGCwGHsY Hjtw== X-Gm-Message-State: AOAM532ScruN55FTU48kueH9DCJ0wdyVmfDcAcw//scmSXb+n0W7yZPv JHi1JU0oZiG6HrQ/Fgar7Q0fE4i5 X-Google-Smtp-Source: ABdhPJyynkwHY4i4+JYOOPmgp4sWIFkevgVCaWUsJ66T6Xk49z2BEnymjvjQuIgGD4xJHYuAMIq5Mw== X-Received: by 2002:adf:9544:: with SMTP id 62mr24871134wrs.32.1592174469106; Sun, 14 Jun 2020 15:41:09 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1ab57.dynamic.kabel-deutschland.de. [188.193.171.87]) by smtp.gmail.com with ESMTPSA id z8sm21491034wru.33.2020.06.14.15.40.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2020 15:41:08 -0700 (PDT) From: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Jun 2020 00:36:53 +0200 Message-Id: <20200614223656.21338-23-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200614223656.21338-1-andreas.rheinhardt@gmail.com> References: <20200614223656.21338-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 23/26] avformat/webvttdec: Fix memleak upon read header failure X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> |
Series |
[FFmpeg-devel,01/26] avformat/matroskadec: Move AVBufferRef instead of copying, fix memleak
|
expand
|
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c index 6c4d5f6736..bd3d45b382 100644 --- a/libavformat/webvttdec.c +++ b/libavformat/webvttdec.c @@ -164,6 +164,8 @@ static int webvtt_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, &webvtt->q); end: + if (res < 0) + ff_subtitles_queue_clean(&webvtt->q); av_bprint_finalize(&cue, NULL); return res; }
The already parsed subtitles (contained in an FFDemuxSubtitlesQueue) would leak if an error happened upon reading a subsequent subtitle. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavformat/webvttdec.c | 2 ++ 1 file changed, 2 insertions(+)