Message ID | 20200614223656.21338-15-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | f161f8e4ad10c8ae5b2e97870e09bc6a421408eb |
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 C61084491DC for <patchwork@ffaux-bg.ffmpeg.org>; Mon, 15 Jun 2020 01:39:23 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B057368B671; Mon, 15 Jun 2020 01:39:23 +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 DF00468B581 for <ffmpeg-devel@ffmpeg.org>; Mon, 15 Jun 2020 01:39:16 +0300 (EEST) Received: by mail-wr1-f65.google.com with SMTP id l11so15184243wru.0 for <ffmpeg-devel@ffmpeg.org>; Sun, 14 Jun 2020 15:39:16 -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=mOLIenKdureWZsZKERHjJhmalwe77vor5dWL/kjs4Kc=; b=CY/fh5qLdBTXgsSN/N4413ofGVq4QppboReihFgIBcq06WGlW28ZquJEiDST9mlzgO 6QL9ZQm2A7AWwhThNoTEBEi4qtRaVz72vJs7PRxjuVKnwzCuBnXp1XOtIzckbdDseSj1 I0laf1wQtT7u6Ifa7Y7nPCimQiOj4qXm/rxItm0HANYFSXTcXCgVAxKHJIGAxM5Cc/lb 6rPDOQ8jB8DwI2yqBxLRA/SYiOLkKV6tOqwJeFwjcwqEQs24KuEyfcReVWEIqphQwpPU A+RC+rPzZhznUz0gf9KItls9CGK8TDdgeyFVgfoX7UpesvKQN6egRKtXSgIHWhmtOveX DeWA== 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=mOLIenKdureWZsZKERHjJhmalwe77vor5dWL/kjs4Kc=; b=W9A+tXn5Ui/Q7ARo8cq7pzEGIDHxkST9UwAWO9E3dv/3pIRQtWbmivQ9mTkntUXFYJ 4bZYk+660mSsqBVVeHEMDxJR27CW3SiznJSZVSDGNUUjuYHZMI54Zk1XtxOq0QJ4GvoK JCm5gqsZva9/xNwZhltEqJ95ky/NXg7K7mqT247DodVjQ/vi3c2NDN4Yk3gB13Y3islq pqGY+TjWeGHW7B/gFz8VKg4b0YPBGOltkWwjOywfoVsLUzoF0X2YGz9v9huu+OWmVvXR dCRtIzmcTTt1EKgd7D/hXhOh1Jwh0PE5h3ZMMYKAboepseNo++kgM7UfrnDw/c6mmWsn LVjg== X-Gm-Message-State: AOAM533hqA2JZKg8wbwMQvsQReVvi04c6JkkZBWZJYDWfcudji6jNT94 fe5zYYnAp8T6wEqqOmssmbQ6HlRP X-Google-Smtp-Source: ABdhPJxP/ZH9cph4mBYETcpOAnr5Xo0ihPdbvYnhhK4oKKX0BD0fyn07i2fFC8tJB2XLqq/sZ2HcuQ== X-Received: by 2002:a5d:6305:: with SMTP id i5mr25127440wru.268.1592174356053; Sun, 14 Jun 2020 15:39:16 -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.39.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2020 15:39:15 -0700 (PDT) From: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Jun 2020 00:36:45 +0200 Message-Id: <20200614223656.21338-15-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 15/26] avformat/samidec: 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/samidec.c b/libavformat/samidec.c index fd98393086..3070ef9bac 100644 --- a/libavformat/samidec.c +++ b/libavformat/samidec.c @@ -108,6 +108,8 @@ static int sami_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, &sami->q); end: + if (res < 0) + ff_subtitles_queue_clean(&sami->q); av_bprint_finalize(&buf, NULL); return res; }
The already parsed subtitles (contained in an FFDemuxSubtitlesQueue) would leak if an error happened upon reading a subsequent subtitle or when creating extradata. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavformat/samidec.c | 2 ++ 1 file changed, 2 insertions(+)