mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
Return AVERROR(ENOMEM) instead of -1 when malloc fails in url_open_dyn_buf_internal
Originally committed as revision 16636 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
aa805f94c5
commit
0e7ceb2442
@ -794,7 +794,7 @@ static int url_open_dyn_buf_internal(ByteIOContext **s, int max_packet_size)
|
|||||||
return -1;
|
return -1;
|
||||||
d = av_mallocz(sizeof(DynBuffer) + io_buffer_size);
|
d = av_mallocz(sizeof(DynBuffer) + io_buffer_size);
|
||||||
if (!d)
|
if (!d)
|
||||||
return -1;
|
return AVERROR(ENOMEM);
|
||||||
*s = av_mallocz(sizeof(ByteIOContext));
|
*s = av_mallocz(sizeof(ByteIOContext));
|
||||||
if(!*s) {
|
if(!*s) {
|
||||||
av_free(d);
|
av_free(d);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user