Message ID | 20200614223656.21338-12-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | 331799747e7e995710f5dfc4d413cda35eb01289 |
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 063BC449042 for <patchwork@ffaux-bg.ffmpeg.org>; Mon, 15 Jun 2020 01:38:50 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E29C068B68B; Mon, 15 Jun 2020 01:38:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E4D8E68B0EE for <ffmpeg-devel@ffmpeg.org>; Mon, 15 Jun 2020 01:38:46 +0300 (EEST) Received: by mail-wm1-f65.google.com with SMTP id d128so12970727wmc.1 for <ffmpeg-devel@ffmpeg.org>; Sun, 14 Jun 2020 15:38:46 -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=vRSrj67wFsTSYqSHeApLP9WzWuGxgPCFv7tZHVWE6iM=; b=ihzNwtDv1A4e88cMug9kdK6j4kXwBkN7XES3p9fVI9V0DaLqPpMt9aHUufrGyDRgaY 6MOksPPCvOgkbJ/pBtqtfBCiUFxO1iCtgAsi9K7uzbnZO/VmkAY6MJqJuTemyNSPncgM OQH1DAH2PjD36tfktNZqz8DGYrcjI80JjGl5lMbKeu6bRiTMmBHZIESpyMbcVei8H8SF M2q5IEpRVEJy+4iIs1pqaYyE+3oE2HTMLxY1ArEIwaRKDEu4y2snvHQEjHV2bVfMbCbi nZhR8+o0GbwG5upQFUY0BeBEIUlGafRWrjN4aCq0L54RDU3NSTNZrarapl5+SDqKRpmH SAPw== 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=vRSrj67wFsTSYqSHeApLP9WzWuGxgPCFv7tZHVWE6iM=; b=F/7xYPrNpGI437SSS48imGTBxi2HY2IZKHO0FPo8UO60aM/pBsFscSuNiRaU6rNKRY tQDCPrsfNZcs+daxRngkqNM9CmGNAvbd2bwxT0aoEHejiX65cuAzkJNw4BvR88WkwHRv 6/ngprfzdOeTDrn4MUyDxbkuVkBJxDGrKNlLp6nGEfwpatAuWkbOcywdmqdSVuDpyjB+ Rv4tZCv6H2KLz07xSe/pwz4AZNebEkudS+CEocS6mJbUhh5kkK0anxINdsDO/SYmHpE/ 5Wem19qFfP0d3dateHS7ZVcLJ1Ef1CfQTSSp0pOlTh1sxPi/eqgMS7jSMs9dEMTAp3/0 Ez3w== X-Gm-Message-State: AOAM530sJztCgwHl+5knHJJgYf8HTr0GUq/5FcCmtrCRzM7ELPWiBbV2 rYBiexKvr0Hrbgn5MojSINnFp2KW X-Google-Smtp-Source: ABdhPJxtR+hEUEB4PzP9okigN7/VbvbI2jJPagIyWLaL6u4kIVUyc/eOfRk5wYRv4vFfdCVnJ0kHWg== X-Received: by 2002:a1c:66d5:: with SMTP id a204mr9871178wmc.134.1592174326201; Sun, 14 Jun 2020 15:38:46 -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.38.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2020 15:38:45 -0700 (PDT) From: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Jun 2020 00:36:42 +0200 Message-Id: <20200614223656.21338-12-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 12/26] avformat/mpl2dec: 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/mpl2dec.c b/libavformat/mpl2dec.c index ddee638c31..bea258d9e9 100644 --- a/libavformat/mpl2dec.c +++ b/libavformat/mpl2dec.c @@ -111,8 +111,10 @@ static int mpl2_read_header(AVFormatContext *s) AVPacket *sub; sub = ff_subtitles_queue_insert(&mpl2->q, p, strlen(p), 0); - if (!sub) + if (!sub) { + ff_subtitles_queue_clean(&mpl2->q); return AVERROR(ENOMEM); + } sub->pos = pos; sub->pts = pts_start; sub->duration = duration;
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/mpl2dec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)