Commit 798ee1ab authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

qt4: fix memory leak

parent bccf8c00
......@@ -217,8 +217,7 @@ int Open::openMRLwithOptions( intf_thread_t* p_intf,
if( options != NULL && options->count() > 0 )
{
ppsz_options = (const char **)malloc( options->count() );
if( ppsz_options ) {
ppsz_options = new const char *[options->count()];
for( int j = 0; j < options->count(); j++ ) {
QString option = colon_unescape( options->at(j) );
if( !option.isEmpty() ) {
......@@ -227,7 +226,6 @@ int Open::openMRLwithOptions( intf_thread_t* p_intf,
}
}
}
}
/* Add to playlist */
int i_ret = playlist_AddExt( THEPL,
......@@ -243,6 +241,7 @@ int Open::openMRLwithOptions( intf_thread_t* p_intf,
if( i_ret == VLC_SUCCESS && b_start && b_playlist )
RecentsMRL::getInstance( p_intf )->addRecent( mrl );
delete[] options;
return i_ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment