From cb5e201f5cb88f127ed81e4276584c7ba10bd30d Mon Sep 17 00:00:00 2001 From: Jack Lau Date: Fri, 10 Oct 2025 18:31:51 +0800 Subject: [PATCH] avformat/whip: cleanup the redundant variable Signed-off-by: Jack Lau --- libavformat/whip.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index 54fa26079d..a11fffb9c6 100644 --- a/libavformat/whip.c +++ b/libavformat/whip.c @@ -1260,7 +1260,7 @@ static int ice_dtls_handshake(AVFormatContext *s) WHIPContext *whip = s->priv_data; int is_dtls_active = whip->flags & WHIP_DTLS_ACTIVE; AVDictionary *opts = NULL; - char buf[256], *cert_buf = NULL, *key_buf = NULL; + char buf[256]; if (whip->state < WHIP_STATE_UDP_CONNECTED || !whip->udp) { av_log(whip, AV_LOG_ERROR, "UDP not connected, state=%d, udp=%p\n", whip->state, whip->udp); @@ -1380,10 +1380,6 @@ next_packet: } end: - if (cert_buf) - av_free(cert_buf); - if (key_buf) - av_free(key_buf); return ret; }