From patchwork Sun Jun 9 15:47:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 49752 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c209:0:b0:460:55fa:d5ed with SMTP id d9csp2068837vqo; Sun, 9 Jun 2024 08:48:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV9YFI2eF7DmgGypyUE1a9RksyuXYDBmhxj2jhPHSCwGkT4gUGPWm27wQAXC45mfT2KTEouPdjfWW1GV5Ov4Rz8bTWiCl/U7mncig== X-Google-Smtp-Source: AGHT+IGNb3yntIeuKfnXaTmrPvEcPb3DaUQNZIQ2LWSoSNgVMHdIGTvkKIPAasCbmR2XD8zMVi1i X-Received: by 2002:a17:906:3805:b0:a6e:f7ae:24f5 with SMTP id a640c23a62f3a-a6ef7ae39c8mr284185166b.55.1717948090131; Sun, 09 Jun 2024 08:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717948090; cv=none; d=google.com; s=arc-20160816; b=EaXBXi+3wzJwAWXayJglBmh/Lc6VHQnAyQ4xVpDyjqXhOwFu0423LMmPwQYgIZP1KT uJVycMT1hUVJTPjM4rFYSmauKHwJUi4OBVNnnqbAR3iQISdSMLDpZye0rYIwCghtF14c q8ePnFgyjVxRo4RocFJxr3cVfEpEDOpzyMczTJh4us5GEQLMLM11Psh6fwNCo/dyutcA Ev2nHybkCUCNdCqqphWOj4QFyBQbr6PDdQjOxSkfnNRtm6D/JS7B8YMu/w0n0IK7+Nhd 4lW9W9AgRZxE1WJ1kXpc8m6wjPgBdA1BDXFDmO9fbIGl9Z/b4EQTHCCTNLW+CiisjZQj VuTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=QE02Na6lgorTU4OqHe1VgZBC7MofphETdWvHgiiQpjY=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=Nhinqk2ywXDMsdY0pCu8bseQo1se9uuPQXS34F1xILGnY1XgSCN4WLiLs73u+7/C/y IbvuPMFjqlwdX1XN2xqpJm1SPlK7UF4sx1KPA/O2pqlUkK3L/zkj+4SRcZimEltX6JjF hULNEeZPZOPeFOTyUnLrQrdxWojHbYKXPgll4Mec+7eKOaCfawNfQ7v5yeC/cEtwW1FG PGm+lZYkxaP8a6Ufluq9XKtMgZExAP9TLQWkvjp+21c8LDhMUd1y2XXPs2hNMYx9G6yw qoF5N8VKe3iy3vW0A/xgFuT0vvBYyBQ5k9vRBWpKJjYxIbmPmNh5nXnT9UgTbXE8gyOR Qxog==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=I8LV0T2u; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a6f0cf7d405si136873266b.65.2024.06.09.08.48.08; Sun, 09 Jun 2024 08:48:10 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=I8LV0T2u; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 070DD68D5FA; Sun, 9 Jun 2024 18:47:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4E4C268D56E for ; Sun, 9 Jun 2024 18:47:49 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id A81A9E0004 for ; Sun, 9 Jun 2024 15:47:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717948068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qxzXcaNI1MZYPoBt3MkSolgcMuacp4Q1U/c6uraOy38=; b=I8LV0T2uYJCl+3xDTnaRbj4vrZ4FM+tOkN2M81cFK93oTtKPylmscR2kK1YZd9iQowZozF NrVTyl0/MhXh81mDYiqlWfoTKp5IM91s3JLJTzfjnJIWGFxafIh5w8JdMMqXqLNKLPh4fr SA3R/Q3t4IfNwzP9x5mC/G0pE7cEhqHhQBe3pFr/32MPI/ikWF2bOegEjDv2UmjhyIf3M6 egLLI+hz2WChRoew3KIWKAX4xGaRPMf8LzYjQz1S+HPDahjc2AqhdaUfjpWf05EPBfc58g UkMJFeKSDy08ysHHMKrqYvzGxy3KJiwN+o+vK0LtAt0Y8akkn1sjECl9hEuFUQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 9 Jun 2024 17:47:42 +0200 Message-ID: <20240609154746.4173264-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240609154746.4173264-1-michael@niedermayer.cc> References: <20240609154746.4173264-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/6] avutil/hwcontext_d3d11va: Free AVD3D11FrameDescriptor on error X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8b+PavQH9b/3 Fixes: CID1598558 Resource leak Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavutil/hwcontext_d3d11va.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index c04ab01a282..9b3c5f389fa 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -190,6 +190,7 @@ static AVBufferRef *wrap_texture_buf(AVHWFramesContext *ctx, ID3D11Texture2D *te sizeof(*frames_hwctx->texture_infos)); if (!frames_hwctx->texture_infos) { ID3D11Texture2D_Release(tex); + av_free(desc); return NULL; } s->nb_surfaces = s->nb_surfaces_used + 1;