From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id F369540DFA for ; Tue, 8 Feb 2022 12:47:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 693ED68B211; Tue, 8 Feb 2022 14:47:56 +0200 (EET) Received: from shout02.mail.de (shout02.mail.de [62.201.172.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2599268B03F for ; Tue, 8 Feb 2022 14:47:50 +0200 (EET) Received: from postfix01.mail.de (postfix03.bt.mail.de [10.0.121.127]) by shout02.mail.de (Postfix) with ESMTP id 139E4A1DC8 for ; Tue, 8 Feb 2022 13:47:49 +0100 (CET) Received: from smtp03.mail.de (smtp03.bt.mail.de [10.0.121.213]) by postfix01.mail.de (Postfix) with ESMTP id EAB2D801C0 for ; Tue, 8 Feb 2022 13:47:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mailde202009; t=1644324469; bh=pkoNEBPLvUWxGIyQPxmtgBIcI5nwtOl2OXfUz5hhsNs=; h=Message-ID:Date:Subject:To:From:From:To:CC:Subject:Reply-To; b=ZxndqkKwPRGsswdDj+Fo2j3FXPwG9d38TdlbHnhXJ6gcKTJcTnVj7s2OYt+I05Bv0 MdUsh65vRTSNmFsQYT1X2QrqpP1UI4EsWIC1Vk2lXopG1pdHn7fXg+uR5/p7xdr4Md E1ngEpY4/ZoSf3Z/MZj7dLlQ4JnWW95e5ZNn6MtZuvWa7o/r3CuLIMllHQNLAduTv9 YdkhZ/ERZGQ5tll2PV6aIXm5/QZN1XoC3Ygbwf0kRyRYKRX6hGVmRUlv/CJWJWyVu2 iP4BnCiPBBQ00lFiwxN2dNj76gLPAWlCu2ecEGQ1WdDd0gJEi7GdVoXyZqwSlbiu2B KryhktRxfqWGw== Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtp03.mail.de (Postfix) with ESMTPSA id ACC34A073D for ; Tue, 8 Feb 2022 13:47:48 +0100 (CET) Message-ID: <722ff81b-e695-4dfb-019b-1d9c3a58ce69@mail.de> Date: Tue, 8 Feb 2022 13:47:47 +0100 MIME-Version: 1.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: From: Thilo Borgmann In-Reply-To: X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 921 X-purgate-ID: 154282::1644324468-00004C55-E9C13819/0/0 Subject: Re: [FFmpeg-devel] [PATCH 1/2] avdevice/avfoundation: fix memleak 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Am 04.02.22 um 17:19 schrieb Zhao Zhili: > --- > libavdevice/avfoundation.m | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m > index 0cd6e646d5..2078c4879c 100644 > --- a/libavdevice/avfoundation.m > +++ b/libavdevice/avfoundation.m > @@ -106,6 +106,7 @@ typedef struct > int audio_device_index; > int audio_stream_index; > > + char *url; > char *video_filename; > char *audio_filename; > > @@ -299,6 +300,7 @@ static void destroy_context(AVFContext* ctx) > ctx->avf_delegate = NULL; > ctx->avf_audio_delegate = NULL; > > + av_freep(&ctx->url); > av_freep(&ctx->audio_buffer); Why carry it in the context instead of adding the missing av_freep() in parse_device_name() ? -Thilo _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".