From patchwork Wed Mar 27 18:19:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47545 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f96:b0:1a3:b6bb:3029 with SMTP id mm22csp812068pzb; Wed, 27 Mar 2024 11:19:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW7NmZn4LY42HDuiCM0vEq8ayZVX0OvWk2e+RhtNu7x/MlF9vPT6pJDJYkIixOqXa5h+7rFVNGLq84gO65rfKXBmmR9CsPicUCkdw== X-Google-Smtp-Source: AGHT+IFZCWpMHRl5IthNvMzOF/ZLDPqvyGWKDk1pZni/tz7/ncDij8e/rco+QDjzhaiPrVDRhzQj X-Received: by 2002:a17:907:6d12:b0:a4e:b31:89d9 with SMTP id sa18-20020a1709076d1200b00a4e0b3189d9mr260139ejc.9.1711563572458; Wed, 27 Mar 2024 11:19:32 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i13-20020a170906698d00b00a474ef20156si3990672ejr.251.2024.03.27.11.19.31; Wed, 27 Mar 2024 11:19:32 -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=@outlook.com header.s=selector1 header.b=F3ls4BC3; arc=fail (body hash mismatch); 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F05E668D65F; Wed, 27 Mar 2024 20:19:27 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2055.outbound.protection.outlook.com [40.92.59.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EC98C68D594 for ; Wed, 27 Mar 2024 20:19:21 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ENJt+lPsSAqsZY2TRyYfRdIb3kakefbqIKwq5li5OctI5/JEcduXvBdql5P+tPdKwURpxLEvlnRDFqBY+u5zP6e6DbVJPDh5hIHbYYJNcpCRtr1I7PX3rMao/UBIF9cUN7qYQR3d9WUmyAgqg2N6dO8B17U/Jy2WaCDdJlU+0Xb8AqmFMj3LbdcHnqU3DqxAp8QTDVaJ/WstUZd9AzXPnJOti/imbe91S62jWGnLUsl6aAo5qx3RVFPM9K6bL65wN8BGKBVktUtvkbvGLy54ghy0tjX40hGHUiiwYGzMwBJfqwdzO0Ai5Jm/QxdK1N3T2ptU01a3bwgYKz5pnPA1+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E7sS9rcA+IYxHQPpvtXiwgBOuK3/Oq3PWArcQv/kcvA=; b=Lo5v077TlsHyYxHHkiwYAtOBBWWmmaKiESMMXnclu/ugqspTvkRlR+ODGIdX86iYn+zXxu8DHYv96xoGIBW4zXGc4FxiJXHF4CdstEVygp7yCsyNSjIfcz8IJ894G+oEXuN2/XylmfihiTj6riqLUicNWKucQqQa1O3sKjgMUBCs0cWd4C83zM1gh4evl5i5lbUS96SPlNYcowH2ch7I5sPsGh2vHWG8t/KaIJ6l0qYABFpWiREZ6Qc8Lzy08xTHzsjoO8MDdbyUSRTLSOBJY2DpHtr/5NoX/WjMfZTTY1iUXASLzll25sC6o+GWWTMwPEs/OXJUOJf6LzfJlQmUag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E7sS9rcA+IYxHQPpvtXiwgBOuK3/Oq3PWArcQv/kcvA=; b=F3ls4BC3t39vm78DJTNzpVNRHmw3s9zTfOMv9VvHOuo6hyTIPohLiw5xNe9a/PXc3MU/EKEplPjzWdJTu+NLi457+dF5rjgMDSy9QIxQQ0t4WaAxjXRfhYNHA//WlwXfVsgESUIsPAPqeQI3UBGhVFa394N2akn5b6YbYPIs2xEK80uXi0mrt0r9Wf6g7P1zDiYe2DgRkhGMNnRLxMDXrc/kBHyV9YqniSP9idQv6iZbFUarrJvv+Xkj0HMkZSGKBuedve8TYHNesqR+rCf5p8ZZ1bmMlShi1Ko+APKhvxqN8XrULa4LSV0/nQvZSXNI4kSiMgafuHtlx105xNOV7w== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DB9P250MB0497.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:33d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Wed, 27 Mar 2024 18:19:19 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.028; Wed, 27 Mar 2024 18:19:19 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 27 Mar 2024 19:19:11 +0100 Message-ID: X-Mailer: git-send-email 2.40.1 X-TMN: [6/doVIym+1MqHwtEOi71ueYmvdMBCpmWrqkUx9EIejM=] X-ClientProxiedBy: FR5P281CA0040.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f3::20) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240327181911.459456-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DB9P250MB0497:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c18a5c5-0c3e-4331-6999-08dc4e8a6af6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KIJOgF5Q/Wx/rwZFEnBHPuLrpaGbpYFRwv8evdgKmcsGZNTzZNvP9ntRykf6GcmLonUwHwm1iaAnIlf+GzVlPPZy72DXR3iDPqkxSZeaLbU3wjhBlqFvuNxGls8SlN1YaLNnwGxFEBM6TGRnwckANM0JWsbJUnghpK0fARGSFh3JJ1uRmfLR6e0Pt9WU8ricHM07gs/pb1hyZ3TamJQbuCMkoCHXXeeg1HOob7d11HqJOHoqZYe4yQ4TgcsbWI9y17mgSBO7mzBSHaRNnTz2/gm4LAv8eBhpyvE1JKGkhd/5Dghcc6X8Z9tJO3q9sm+2PgsVC3mlKqDdGawJJCNQd5P1jX9DNUhrAxmGd/e3BUrKN6ithsajzEbvUXvabg3K0U4pVr5Ug4l8Zt0MRn9ZbaT+B6Lm2LE869xDR7egTVd5S1uc96K5m8J84QVX/COBbvWHxJpjvBroD7YikkI6Ykh3anh15IY7nwAmpCoUBo69GlJ3RE6V9YLfbxrPHIqA4AiSqfHM4zbMgm1dHev3Rlc+aEVfUXS2y6/T/f5tLZN9cettuNFTa2iBeMnF91AdZTYfKKacOwjojAvP1iW1Q+fCJZIothT/EiklwN+DzjR7yA+gbP/I3BMj2xfYEZRP X-MS-Exchange-AntiS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fXKKfsno7rUB4doub/xhE16zjOWAWUK0QHKvB/FOceNs4blbAphEZQrG6BB+IzggOQhtOqC45dHvDYAJAD5JY0eGNYZ+heysV5WKWFuoobV3Kq4elmXjS7UxWWEXZI3fGJSp5mbJA7nUq2mPpDX1ks8bRrWLnXBlHMGjvpzDmaQ9dnXPDXkfjxbSCIa1FpAWCQ/4ZS5Mk05JIih6r617A4W0tbdZm5H25iz8MnjOR98Mx30/4NVQ9jZYwFqz9YSlL8ptZw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c18a5c5-0c3e-4331-6999-08dc4e8a6af6 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2024 18:19:19.0671 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P250MB0497 Subject: [FFmpeg-devel] [PATCH] avformat/rtmpproto: Don't free AVOpt-strings manually, fix crash 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 Cc: Armin Hasitzka , Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: xDZ43s67QsGs Besides being redundant, freeing manually is actually harmful here, as rtmp_close() may call gen_fcunpublish_stream() which dereferences rt->playpath. Reported-by: Armin Hasitzka Signed-off-by: Andreas Rheinhardt --- libavformat/rtmpproto.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 4b01b67d28..b1d73b3d75 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2917,9 +2917,6 @@ reconnect: return 0; fail: - av_freep(&rt->playpath); - av_freep(&rt->tcurl); - av_freep(&rt->flashver); av_dict_free(opts); rtmp_close(s); return ret;