mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avformat/rtsp: free the alloc memory if failed
Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
parent
130e4c6f4c
commit
f210766a55
@ -1245,8 +1245,10 @@ start:
|
||||
content = av_malloc(content_length + 1);
|
||||
if (!content)
|
||||
return AVERROR(ENOMEM);
|
||||
if (ffurl_read_complete(rt->rtsp_hd, content, content_length) != content_length)
|
||||
if (ffurl_read_complete(rt->rtsp_hd, content, content_length) != content_length) {
|
||||
av_freep(&content);
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
content[content_length] = '\0';
|
||||
}
|
||||
if (content_ptr)
|
||||
|
Loading…
Reference in New Issue
Block a user