mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-13 17:07:21 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user