From ac2e81e3f429281d3c9dc084a6fe44d71eaf1d26 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Sun, 22 Jul 2012 16:31:36 -0700 Subject: [PATCH] fix memory leak (coverity-709378) --- src/framework/mlt_profile.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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. -- 2.39.2