avformat/whip: Avoid uninitialized pointer read

Do not try to free the io context if it was never allocated.

Fixes coverity #1665383

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
This commit is contained in:
Vignesh Venkat
2026-02-19 10:58:00 -08:00
committed by Jack Lau
parent e8a07be1c2
commit 51349e31fc

View File

@@ -892,8 +892,7 @@ static int parse_answer(AVFormatContext *s)
if (!whip->sdp_answer || !strlen(whip->sdp_answer)) {
av_log(whip, AV_LOG_ERROR, "No answer to parse\n");
ret = AVERROR(EINVAL);
goto end;
return AVERROR(EINVAL);
}
pb = avio_alloc_context(whip->sdp_answer, strlen(whip->sdp_answer), 0, NULL, NULL, NULL, NULL);