Fix CID 1457235. Signed-off-by: Nicolas George <geo...@nsup.org> --- libavutil/buffer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavutil/buffer.c b/libavutil/buffer.c index 6d9cb7428e..2f33e5ebb6 100644 --- a/libavutil/buffer.c +++ b/libavutil/buffer.c @@ -171,6 +171,7 @@ int av_buffer_realloc(AVBufferRef **pbuf, int size) { AVBufferRef *buf = *pbuf; uint8_t *tmp; + int ret; if (!buf) { /* allocate a new buffer with av_realloc(), so it will be reallocatable @@ -197,9 +198,9 @@ int av_buffer_realloc(AVBufferRef **pbuf, int size) /* cannot realloc, allocate a new reallocable buffer and copy data */ AVBufferRef *new = NULL; - av_buffer_realloc(&new, size); + ret = av_buffer_realloc(&new, size); if (!new) - return AVERROR(ENOMEM); + return ret; memcpy(new->data, buf->data, FFMIN(size, buf->size)); -- 2.24.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".