aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-08-17 15:12:22 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-08-17 15:12:22 +0000
commit4f9ce3c4c796d475656161644cca9bead523d6e7 (patch)
tree369bacd6c066434b0cba0d206ebbe9d942338e7e /libavfilter/avfilter.c
parent6fa5a91b144fb32a3a1552ca40375b60aaa13d54 (diff)
downloadffmpeg-4f9ce3c4c796d475656161644cca9bead523d6e7.tar.gz
Add missing NULL checks in avfilter_ref_buffer().
Originally committed as revision 24808 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index a0643c989f..0d05c266cc 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -48,9 +48,15 @@ const char *avfilter_license(void)
AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
{
AVFilterBufferRef *ret = av_malloc(sizeof(AVFilterBufferRef));
+ if (!ret)
+ return NULL;
*ret = *ref;
if (ref->type == AVMEDIA_TYPE_VIDEO) {
ret->video = av_malloc(sizeof(AVFilterBufferRefVideoProps));
+ if (!ret->video) {
+ av_free(ret);
+ return NULL;
+ }
*ret->video = *ref->video;
}
ret->perms &= pmask;