Message ID | 20200913025753.274772-4-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | 2a71cbeb019fabd70f04ca9d2ec5d0bff3b3e3d2 |
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 DC72D449E91 for <patchwork@ffaux-bg.ffmpeg.org>; Sun, 13 Sep 2020 05:58:32 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C506568BBD2; Sun, 13 Sep 2020 05:58:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B7A3468BBBB for <ffmpeg-devel@ffmpeg.org>; Sun, 13 Sep 2020 05:58:23 +0300 (EEST) Received: by mail-wr1-f66.google.com with SMTP id z1so15070957wrt.3 for <ffmpeg-devel@ffmpeg.org>; Sat, 12 Sep 2020 19:58:23 -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=l++VrG4XnSHpy4Lrw5yMVQXiP4FE0Mabn04b1B75sh4=; b=EJzn4Fgs4QUAmbyko0q+VjzJslOpLv7VNihi2RjkWjZkZS1y8+trKRpbgsNAvacGQw Vi2zzbAXFEVwppE6oUbPjc1gEID0NPjdtryAZwwlePOIVoqYYFrJrXOOHEqu6V04XQMH CG/nPsx36ZekAVfC7wACl7UsaNYCV2WA8+lgUNI7DJwAN+vHLY+A1lBp0oWu4SMEAbR+ iMGmDm77Yr8w16X1loU1z7tlbbPLXjiFZ7eOa4mrXxfgVQYuPMUZDIQbkdk/MSxcqepH WCh+GcHL5EYRVCwt0za7NBXpHiieM1ud8Lpt86zu94CcnPamB3Po2vEgTuN/d8klhtoZ MGTQ== 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=l++VrG4XnSHpy4Lrw5yMVQXiP4FE0Mabn04b1B75sh4=; b=RFSwrIjwYnQTAdKAIq7VYVTOcwK0H1kdrxli4PlBut97a0GVhXPlE4iWmfUs/RrlaI JNdMFLV8I7ahCsYtB25dk2g0VqIvzJ0sRcrYa3DmhZ4IMMmvKrSgrbzyhsvRwpqGrZUV SaU72kwqgjz1ZG3O8n9hEE0Gku8f26d1o0E0fYjZBPi2z0ORiZ32QKpBUPuRmrc37CW2 42bDlJlTHsBS58M4urNI32Y3sdBFYRg5zgj26GzQx21k77hT1PFHjIG1Epmfq/ezQ0BW WVTUhiTzrNWo4+W47x0klIKBJe66I09w3saDtsbT15uJFKVoZ0IlwB+8SQPJcPlcb+CP IwjQ== X-Gm-Message-State: AOAM530egM7540twyV1qxFpvnukLxMRAZKlUH+XEGwNSWIm9tzjhsvBj sOUTbXotXxAuGnc9EMsBEPaSC4w1WGA= X-Google-Smtp-Source: ABdhPJx1pF19J6gHRZOyBxOt6ZRU4CXmmv2Ya1aUEJ5PJKj3cMP+4SS92+SeUxsQs9ofSOzwMWbhAg== X-Received: by 2002:adf:c44d:: with SMTP id a13mr8971762wrg.11.1599965902952; Sat, 12 Sep 2020 19:58:22 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1fb0f.dynamic.kabel-deutschland.de. [188.193.251.15]) by smtp.gmail.com with ESMTPSA id f3sm11883355wmb.35.2020.09.12.19.58.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 19:58:22 -0700 (PDT) From: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> To: ffmpeg-devel@ffmpeg.org Date: Sun, 13 Sep 2020 04:57:41 +0200 Message-Id: <20200913025753.274772-4-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200913025753.274772-1-andreas.rheinhardt@gmail.com> References: <20200913025753.274772-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 04/16] avcodec/qtrleenc: Fix memleak upon allocation 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/16] avcodec/snowdec: Use ff_snow_common_init() directly
|
expand
|
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c index 6669c1302f..8b0edf7b3d 100644 --- a/libavcodec/qtrleenc.c +++ b/libavcodec/qtrleenc.c @@ -413,4 +413,5 @@ AVCodec ff_qtrle_encoder = { .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB555BE, AV_PIX_FMT_ARGB, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE }, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, };
The qtrle encoder allocates several buffers and an AVFrame in its init function. If one of these allocations fails, but others succeed, the successfully allocated objects leak. This is fixed by setting the FF_CODEC_CAP_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/qtrleenc.c | 1 + 1 file changed, 1 insertion(+)