]> git.sesse.net Git - mlt/commitdiff
fix memory leak (coverity-709376)
authorDan Dennedy <dan@dennedy.org>
Sun, 22 Jul 2012 23:28:08 +0000 (16:28 -0700)
committerDan Dennedy <dan@dennedy.org>
Sun, 22 Jul 2012 23:28:08 +0000 (16:28 -0700)
src/framework/mlt_consumer.c

index e5fb1e1121e5560f3ed259d02f7f9e57aef9385c..9ff244b72ac30072027730b67c23b4fc23b97590 100644 (file)
@@ -176,7 +176,6 @@ static void mlt_consumer_property_changed( mlt_properties owner, mlt_consumer se
                                free( profile->description );
                                memcpy( profile, new_profile, sizeof( struct mlt_profile_s ) );
                                profile->description = strdup( new_profile->description );
-                               mlt_profile_close( new_profile );
                        }
                        else
                        {
@@ -185,6 +184,7 @@ static void mlt_consumer_property_changed( mlt_properties owner, mlt_consumer se
 
                        // Apply to properties
                        apply_profile_properties( self, profile, properties );
+                       mlt_profile_close( new_profile );
                }
        }
        else if ( !strcmp( name, "frame_rate_num" ) )