Message ID | 20200614223656.21338-22-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | 67434afa7fcb2b411b10a4d09fb30cd3a5907c2c |
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 D39F244A382 for <patchwork@ffaux-bg.ffmpeg.org>; Mon, 15 Jun 2020 01:40:43 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BB13268B6C0; Mon, 15 Jun 2020 01:40:43 +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 8F42E68B654 for <ffmpeg-devel@ffmpeg.org>; Mon, 15 Jun 2020 01:40:37 +0300 (EEST) Received: by mail-wr1-f65.google.com with SMTP id h5so15198671wrc.7 for <ffmpeg-devel@ffmpeg.org>; Sun, 14 Jun 2020 15:40:37 -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=06V2Gqz5iB6VxwwHEiExfADC+0GOBdwwX7x4he8h+BI=; b=M/rzkMpEfaR8MjFHmTWazgh+RL8ig0Atz0cxxg/TBv7+E9NmoHYhEOs+PbBAIwgsaM YWKGK3PGMP40+ZquNOSM5QCEMlXnybeCWamwiJBgpwWf/ZFgSEhX4MiycPq6zYTh6CGM foF5MsulBEQvaKURqja1AlZ80AV89+ZSiW6lnGKSYAaPP4uD4rihdOZ8BOAOlc9NFY21 AAskP2niRgk/oHgP8CvEBnXrl28bbFFOJWAiEqyfCmk7jQCFCNNdbUqeOeXOo37+y8bf YzoO3yQVuCuA2Hl6YC5/Dw8CCwZwTvGmXn35/jSBhhbEOfjpWD8g49rtr4AkxMBBYw4d 6sYg== 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=06V2Gqz5iB6VxwwHEiExfADC+0GOBdwwX7x4he8h+BI=; b=PZQn7Q7s5LLL5iOIa6X+gUXAZJDfNbCoMMNmFYK1EZef931yn+5QP/1OLmZS26HTfc AQjMaG+EPE9+jabwMniZR9RvoXlpKFlc0zwe/FAGhlCU3WP800CNnm/5YlRa4IDE4BJp Ts/jbX1K3lnB4+Jm/LmdoNenXQelzV4TOeJE3HcX6wQ5ibaucqPyPGwCkazrK8U4Xecn fmlGPwJ/0ItPrGG/0lgsSpT8t6qe/RYHeX6FdWHJGrCfw39EebOhWdW9gDyeesTMKGvQ Ni/543jpyGP94VevYMlGTcEUyvFD6ZLzaVzTH905G/tLrAkHQpmRWfeL6amZXeq/b92P Xc1w== X-Gm-Message-State: AOAM533i3Mv+ldnFbYVefTTibZ2MNYze9CUX0Try4fRfIGvE+Om5TRp7 H/Uio6KInmdqNVfsHcWrTSrH5xH8 X-Google-Smtp-Source: ABdhPJxL3yoO0cxHFGhevFiNqd8c4yhBf93VfiztU3eKlQFcKdOCohfmPmkir3sMi7tqGTrcacspKA== X-Received: by 2002:a5d:6144:: with SMTP id y4mr26659766wrt.185.1592174436824; Sun, 14 Jun 2020 15:40:36 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2020 15:40:36 -0700 (PDT) From: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Jun 2020 00:36:52 +0200 Message-Id: <20200614223656.21338-22-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 22/26] avformat/vplayerdec: 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/vplayerdec.c b/libavformat/vplayerdec.c index e3e7b4efb8..ca23ec76ac 100644 --- a/libavformat/vplayerdec.c +++ b/libavformat/vplayerdec.c @@ -83,8 +83,10 @@ static int vplayer_read_header(AVFormatContext *s) AVPacket *sub; sub = ff_subtitles_queue_insert(&vplayer->q, p, strlen(p), 0); - if (!sub) + if (!sub) { + ff_subtitles_queue_clean(&vplayer->q); return AVERROR(ENOMEM); + } sub->pos = pos; sub->pts = pts_start; sub->duration = -1;
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/vplayerdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)