]> git.sesse.net Git - mlt/blobdiff - src/modules/xml/consumer_xml.c
fix memory leak (coverity-710864)
[mlt] / src / modules / xml / consumer_xml.c
index 2230228f4a2cfc5e203cefece4a46cd827a3e065..8ed27204d293cb5a4d25c5958b4bbab0788e93f8 100644 (file)
@@ -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 );