summaryrefslogtreecommitdiff
path: root/libavcodec/r210dec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-01-28 20:09:05 +0000
committerMichael Niedermayer <michaelni@gmx.at>2012-01-28 22:08:20 +0100
commit1e90450fad76427d781f0ee44d8ee41037a395d1 (patch)
tree58bcc00c81c4a39817a2528f5d72c9b4bf1226d8 /libavcodec/r210dec.c
parent1fa24d08b2279e0a770c056178ea2bc0754cdeae (diff)
r210dec: check return value of avcodec_alloc_frame()
Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/r210dec.c')
-rw-r--r--libavcodec/r210dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
index d31033229f..d8cad3535c 100644
--- a/libavcodec/r210dec.c
+++ b/libavcodec/r210dec.c
@@ -29,6 +29,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx->bits_per_raw_sample = 10;
avctx->coded_frame = avcodec_alloc_frame();
+ if (!avctx->coded_frame)
+ return AVERROR(ENOMEM);
return 0;
}