]> git.sesse.net Git - mlt/commitdiff
producer_xml: fix leak of consumer service
authorDan Dennedy <dan@dennedy.org>
Sat, 10 Nov 2012 18:23:48 +0000 (10:23 -0800)
committerDan Dennedy <dan@dennedy.org>
Sat, 10 Nov 2012 18:23:48 +0000 (10:23 -0800)
src/modules/xml/producer_xml.c

index d38724e91af57f0fa7da929c8d99b903d243e0a7..2984421394c42b2dee332dc0a357c31fb64cd253 100644 (file)
@@ -1132,10 +1132,14 @@ static void on_end_consumer( deserialise_context context, const xmlChar *name )
                                        // Inherit the properties
                                        mlt_properties_inherit( MLT_CONSUMER_PROPERTIES(context->consumer), properties );
                                }
-                               // Close the dummy
-                               mlt_service_close( service );
                        }
                }
+               // Close the dummy
+               if ( service )
+               {
+                       mlt_service_close( service );
+                       free( service );
+               }
        }
 }