Skip to content

Commit

Permalink
fix memory leak (#841)
Browse files Browse the repository at this point in the history
* fix memory leak when xml file has 'consumer' tag but does not have 'profile' tag

* style:  fix the indentation

Co-authored-by: songzhuo <[email protected]>
  • Loading branch information
Adonis-Song and SongAdonis authored Nov 19, 2022
1 parent 6eb55fe commit 769cf9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/melt/melt.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,9 @@ int main( int argc, char **argv )
if ( ! profile->is_explicit )
{
mlt_profile_from_producer( profile, melt );
mlt_consumer melt_consumer = MLT_CONSUMER( mlt_service_consumer( MLT_PRODUCER_SERVICE( melt ) ) );
if (melt_consumer)
mlt_consumer_connect(melt_consumer, NULL);
mlt_producer_close( melt );
melt = mlt_factory_producer( profile, "melt", &argv[ 1 ] );
}
Expand Down

0 comments on commit 769cf9d

Please sign in to comment.