msg_Dbg( p_input, "opening directory `%s'", psz_name );
if( ReadDir( p_playlist, psz_name , i_mode, &i_pos ) != VLC_SUCCESS )
{
- free( psz_name );
goto end;
}
end:
+ if( psz_name ) free( psz_name );
+ if( psz_mode ) free( psz_mode );
vlc_object_release( p_playlist );
p_input->b_eof = 1;
return 0;
return;
}
- if( (i_type & VLC_VAR_TYPE) == VLC_VAR_STRING ) free( val.psz_string );
+ if( val.psz_string ) free( val.psz_string );
if( text.psz_string ) free( text.psz_string );
}
if( !strcmp( val.psz_string, val_list.p_list->p_values[i].psz_string ) && !( i_type & VLC_VAR_ISCOMMAND ) )
[o_lmi setState: TRUE ];
+ free( another_val.psz_string );
+
break;
case VLC_VAR_INTEGER:
}
/* clean up everything */
- if( (i_type & VLC_VAR_TYPE) == VLC_VAR_STRING ) free( val.psz_string );
+ if( val.psz_string ) free( val.psz_string );
var_Change( p_object, psz_variable, VLC_VAR_FREELIST, &val_list, &text_list );
}
do
{
+ char *psz_temp;
i_current++;
vlc_mutex_lock( &p_playlist->object_lock );
o_current_name = [NSString stringWithUTF8String:
p_playlist->pp_items[i_current]->input.psz_name];
- o_current_author = [NSString stringWithUTF8String:
- playlist_GetInfo(p_playlist, i_current ,_("General"),_("Author") )];
+ psz_temp = playlist_GetInfo(p_playlist, i_current ,_("General"),_("Author") );
+ o_current_author = [NSString stringWithUTF8String: psz_temp];
+ free( psz_temp);
vlc_mutex_unlock( &p_playlist->object_lock );
}
else if( [[o_tc identifier] isEqualToString:@"2"] )
{
+ char *psz_temp;
vlc_mutex_lock( &p_playlist->object_lock );
- o_value = [NSString stringWithUTF8String:
- playlist_GetInfo(p_playlist, i_row ,_("General"),_("Author") )];
- if( o_value == NULL )
- o_value = [NSString stringWithCString:
- playlist_GetInfo(p_playlist, i_row ,_("General"),_("Author") )];
+ psz_temp = playlist_GetInfo( p_playlist, i_row ,_("General"),_("Author") );
vlc_mutex_unlock( &p_playlist->object_lock );
+
+ if( psz_temp == NULL )
+ {
+ o_value = @"";
+ }
+ else
+ {
+ o_value = [NSString stringWithUTF8String: psz_temp];
+ if( o_value == NULL )
+ {
+ o_value = [NSString stringWithCString: psz_temp];
+ }
+ free( psz_temp );
+ }
}
else if( [[o_tc identifier] isEqualToString:@"3"] )
{
FIND_ANYWHERE );
- if (p_playlist)
+ if( p_playlist )
{
+ char *psz_temp;
+
/*fill uri / title / author info */
[o_uri_txt setStringValue:
([NSString stringWithUTF8String:p_playlist->
[NSString stringWithUTF8String:p_playlist->
pp_items[i_item]->input.psz_name]];
- [o_author_txt setStringValue:
- [NSString stringWithUTF8String:playlist_GetInfo
- (p_playlist, i_item ,_("General"),_("Author") )]];
+ psz_temp = playlist_GetInfo( p_playlist, i_item ,_("General"),_("Author") );
+ [o_author_txt setStringValue: [NSString stringWithUTF8String: psz_temp]];
+ free( psz_temp );
[[VLCInfoTreeItem rootItem] refresh];
[o_outline_view reloadData];
free( *tmp2++ );
}
free( tmp );
+ free( val1.psz_string );
}
if( psz_sub_file ) free( psz_sub_file );