From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id 14D044D164
	for <ffmpegdev@gitmailbox.com>; Mon, 17 Feb 2025 18:42:53 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 53B0868C18E;
	Mon, 17 Feb 2025 20:42:49 +0200 (EET)
Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com
 [209.85.128.171])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1EC2968C0E9
 for <ffmpeg-devel@ffmpeg.org>; Mon, 17 Feb 2025 20:42:43 +0200 (EET)
Received: by mail-yw1-f171.google.com with SMTP id
 00721157ae682-6fb0de4ecd4so41433597b3.3
 for <ffmpeg-devel@ffmpeg.org>; Mon, 17 Feb 2025 10:42:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1739817761; x=1740422561; darn=ffmpeg.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=l6YhMl35DiRYKUgyaewTz1VKRGbCHPLu6ruaoMWyLCI=;
 b=TcMhoVaocKJdCATHd/M0iLu0Dx/SMH8ZISUlnjz6OHUOU5rDfrCpNh3YdZKoIDkHIF
 7HCG7rKIo0mFTSBFOtSzhHO/vrgcVem62wFFevmQfALZuzWSEu7BpnWG8KftC19qDa+L
 UHECu3Zk71dbtiV+vMdY3zmZy5+4w4ZCxoncACx72zDr92K+rU2zi3ZVu5rGRfHB1SKU
 IisjZODRMnWnxR3RvCmAoG0tIxqFR+n8RkntjSjIv2RHX65BdcW99dCuiA+vZh5uPIxO
 dAkyM14ygtz2xUdGeAN3P9w8362tU+PQ9qLPuxNlM5E3xWlYSdaT9OfE7VA8i6Jg73EV
 kxgA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1739817761; x=1740422561;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=l6YhMl35DiRYKUgyaewTz1VKRGbCHPLu6ruaoMWyLCI=;
 b=jU91WoTsvQrvdCrGC2Q1G8oT3ixBxlxo6dZdC5Fgo4HpeC8eevZbBBVH26/u9UNVAu
 bQaWl6LzXQ5Pn76yvnTo9xM3yVoVYTR17k9WnCzsK7HiL/WaUn2jDtG3FkvK5JtiDYur
 ZjhQiu5kw5qHvUj8D6INtSqv81UQyKot3kJ7TIapPdQm9QiDdj1pYsJE7j701QzMKrH6
 kZVZsUz3KojGdgVy77WYDBoqjGq7WOMC6Ek9UnXop+YVCdLnsim9vT12trZOi5mBDy3E
 9LEyIzSCyVE53F8xKB+rqxjYGoIOPH5xOWNqwE7aJN3Db9J9Ce1VarqT3gCF3N2VVspt
 KuIA==
X-Gm-Message-State: AOJu0YwimJjqiyAV+ZtP4x6Oqh971kzEyd5+c7dDU4FjQtbik6Nq0Y18
 rVOsF2iip/SW/3oM9Pw9zt6WTp2DiskXVVh6rJMWTZd8V28wpwfXfmpP3ENz
X-Gm-Gg: ASbGncvy8cvzf1UnxFVOj4Kx2xyEG62ai8egwmUBsxfTE8gwbMxb4ZCxrb5Arb4GHWI
 /CHKHFIbI3TQ1mLO/pH2t1NoYlO+O5I4lm0VWUiHFsE6++CUAfJpsAdGiTGDQEdxmToW1U/7XN7
 tZMLhLP0sg6ZHqyuVogePnUdeg09Q3B9w7Q9gLWLFOB9I0KJO0PGxm5BUiqyCMvB6LP2hS57Ebf
 RmTv86NoNpi2tT+1qixKJwlHBcw7VZ8D2rptg7N7DZQ5YKAUc+GnLuW8jCMHw5JUoQcOPSsrFhW
 Xht0coyuUrjSRr4uGJel86ooCefRilKJSrv3pQ44QmhorPPuVHEKU2twj/KXhXm9j6FXBbD3zD4
 uaSH+7peR4Q==
X-Google-Smtp-Source: AGHT+IFqyC4JIGPGmQ5F6L1aE0mZDZZ57KGmmlKXE7iBnR6fvUUQx8FyyynOJpvS3JkeKGuozG1LVA==
X-Received: by 2002:a05:690c:28b:b0:6ef:4ba4:eca8 with SMTP id
 00721157ae682-6fb5802e8a7mr85434157b3.0.1739817761469; 
 Mon, 17 Feb 2025 10:42:41 -0800 (PST)
Received: from localhost.localdomain
 (108-65-109-112.lightspeed.tukrga.sbcglobal.net. [108.65.109.112])
 by smtp.gmail.com with ESMTPSA id
 00721157ae682-6fb3619cb1fsm22068157b3.90.2025.02.17.10.42.40
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 17 Feb 2025 10:42:41 -0800 (PST)
From: Rashad Tatum <tatum.rashad@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Date: Mon, 17 Feb 2025 13:41:30 -0500
Message-ID: <20250217184149.921456-2-tatum.rashad@gmail.com>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <20250217184149.921456-1-tatum.rashad@gmail.com>
References: <20250217184149.921456-1-tatum.rashad@gmail.com>
MIME-Version: 1.0
Subject: [FFmpeg-devel] [PATCH v2 2/2] libavformat/rtsp: Free memory
 allocated for temporary variables while processing sdp info
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
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: Rashad Tatum <tatum.rashad@gmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/20250217184149.921456-2-tatum.rashad@gmail.com/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

---
 libavformat/rtsp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 0c65f8d1a4..da733938bc 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -478,6 +478,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
                                               sdp_ip_str);
 
         }
+        av_freep(sdp_ip_str);
         break;
     case 's':
         av_dict_set(&s->metadata, "title", p, 0);
@@ -702,6 +703,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
                     }
                 }
             }
+            av_freep(dest_addr);
         } else {
             if (rt->server_type == RTSP_SERVER_WMS)
                 ff_wms_parse_sdp_a_line(s, p);
-- 
2.48.1

_______________________________________________
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".