diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-02-22 19:49:06 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-02-22 22:32:18 +0000 |
commit | e570f895cdccf2535a71fec1c607751ddb94fd5a (patch) | |
tree | 10a4afdb594f48323232eaba438da8aaba4ee3d6 /libavcodec/libschroedinger.c | |
parent | 521979e6b1e7a89751aebc285a40d6508f8af48f (diff) |
libschroedinger: Check memory allocations
Diffstat (limited to 'libavcodec/libschroedinger.c')
-rw-r--r-- | libavcodec/libschroedinger.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/libschroedinger.c b/libavcodec/libschroedinger.c index fc9188cb8a..157433ea95 100644 --- a/libavcodec/libschroedinger.c +++ b/libavcodec/libschroedinger.c @@ -191,6 +191,8 @@ SchroFrame *ff_create_schro_frame(AVCodecContext *avctx, uv_height = y_height >> (SCHRO_FRAME_FORMAT_V_SHIFT(schro_frame_fmt)); p_pic = av_mallocz(sizeof(AVPicture)); + if (!p_pic) + return NULL; avpicture_alloc(p_pic, avctx->pix_fmt, y_width, y_height); p_frame = schro_frame_new(); |