]> git.sesse.net Git - mlt/commitdiff
fix memory leak (coverity-709378)
authorDan Dennedy <dan@dennedy.org>
Sun, 22 Jul 2012 23:31:36 +0000 (16:31 -0700)
committerDan Dennedy <dan@dennedy.org>
Sun, 22 Jul 2012 23:33:24 +0000 (16:33 -0700)
src/framework/mlt_profile.c

index 8766349f56cff877f3373ea2b04c6a2ad7ab1dc6..a0ae64808ca1057594fbc01ed1cb714f1433d601 100644 (file)
@@ -231,6 +231,8 @@ mlt_profile mlt_profile_load_properties( mlt_properties properties )
 mlt_profile mlt_profile_load_string( const char *string )
 {
        mlt_properties properties = mlt_properties_new();
+       mlt_profile profile = NULL;
+
        if ( properties )
        {
                const char *p = string;
@@ -241,8 +243,10 @@ mlt_profile mlt_profile_load_string( const char *string )
                        p = strchr( p, '\n' );
                        if ( p ) p++;
                }
+               profile = mlt_profile_load_properties( properties );
+               mlt_properties_close( properties );
        }
-       return mlt_profile_load_properties( properties );
+       return profile;
 }
 
 /** Get the video frame rate as a floating point value.