postproc/postprocess: Check for av_malloc() failure
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 22 Feb 2015 02:19:05 +0000 (03:19 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 22 Feb 2015 02:19:05 +0000 (03:19 +0100)
Fixes CID1271052

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libpostproc/postprocess.c

index 7f999f9..4d54c6d 100644 (file)
@@ -700,6 +700,8 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
     }
 
     ppMode= av_malloc(sizeof(PPMode));
+    if (!ppMode)
+        return NULL;
 
     ppMode->lumMode= 0;
     ppMode->chromMode= 0;