From: Dan Dennedy Date: Sun, 22 Jul 2012 23:31:36 +0000 (-0700) Subject: fix memory leak (coverity-709378) X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ac2e81e3f429281d3c9dc084a6fe44d71eaf1d26;p=mlt fix memory leak (coverity-709378) --- diff --git a/src/framework/mlt_profile.c b/src/framework/mlt_profile.c index 8766349f..a0ae6480 100644 --- a/src/framework/mlt_profile.c +++ b/src/framework/mlt_profile.c @@ -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.