[FFmpeg-cvslog] r24808 - trunk/libavfilter/avfilter.c
stefano
subversion
Tue Aug 17 17:12:22 CEST 2010
Author: stefano
Date: Tue Aug 17 17:12:22 2010
New Revision: 24808
Log:
Add missing NULL checks in avfilter_ref_buffer().
Modified:
trunk/libavfilter/avfilter.c
Modified: trunk/libavfilter/avfilter.c
==============================================================================
--- trunk/libavfilter/avfilter.c Tue Aug 17 17:02:33 2010 (r24807)
+++ trunk/libavfilter/avfilter.c Tue Aug 17 17:12:22 2010 (r24808)
@@ -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;
More information about the ffmpeg-cvslog
mailing list