Check calloc() return and fix Coverity CID 709328: Unchecked return value (CHECKED_RETURN)
Calling function "mlt_producer_init" without checking return value (as is done elsewhere 19 out of 20 times).
No check of the return value of "mlt_producer_init(producer, NULL)".
254 mlt_producer_init( producer, NULL );
if ( !arg ) return NULL;
mlt_producer producer = NULL;
producer = calloc( 1, sizeof( struct mlt_producer_s ) );
- mlt_producer_init( producer, NULL );
+ if ( !producer )
+ return NULL;
+
+ if ( mlt_producer_init( producer, NULL ) )
+ {
+ free( producer );
+ return NULL;
+ }
// Wrap loader
mlt_producer real_producer;