From: Dan Dennedy Date: Mon, 23 Jul 2012 01:39:54 +0000 (-0700) Subject: fix memory leak (coverity-710864) X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=93405b38f839546b1c661ca1ee12814e0f6214a8;p=mlt fix memory leak (coverity-710864) --- diff --git a/src/modules/xml/consumer_xml.c b/src/modules/xml/consumer_xml.c index 2230228f..8ed27204 100644 --- a/src/modules/xml/consumer_xml.c +++ b/src/modules/xml/consumer_xml.c @@ -234,9 +234,11 @@ static void serialise_properties( serialise_context context, mlt_properties prop strcmp( name, "width" ) && strcmp( name, "height" ) ) { - char *value = filter_restricted( mlt_properties_get_value( properties, i ) ); + char *value; if ( !strcmp( name, "length" ) ) value = strdup( mlt_properties_get_time( properties, name, context->time_format ) ); + else + value = filter_restricted( mlt_properties_get_value( properties, i ) ); if ( value ) { int rootlen = strlen( context->root );