[MPlayer-cvslog] r36028 - trunk/gui/dialog/fileselect.c
ib
subversion at mplayerhq.hu
Thu Mar 21 10:15:06 CET 2013
Author: ib
Date: Thu Mar 21 10:15:06 2013
New Revision: 36028
Log:
Fix get_current_dir_name_utf8() memory leaks.
Modified:
trunk/gui/dialog/fileselect.c
Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c Thu Mar 21 00:08:34 2013 (r36027)
+++ trunk/gui/dialog/fileselect.c Thu Mar 21 10:15:06 2013 (r36028)
@@ -488,10 +488,14 @@ static void fs_fsPathCombo_changed( GtkE
static void fs_Up_released( GtkButton * button, gpointer user_data )
{
+ char *utf8dir;
+
chdir( ".." );
fsSelectedFile=fsThatDir;
CheckDir( fsFNameList );
- gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),(unsigned char *)get_current_dir_name_utf8() );
+ utf8dir = get_current_dir_name_utf8();
+ gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),(unsigned char *)utf8dir );
+ g_free(utf8dir);
return;
}
@@ -505,10 +509,13 @@ static void fs_Ok_released( GtkButton *
if( ( stat( fsSelectedFile,&fs ) == 0 ) && S_ISDIR( fs.st_mode ) )
{
+ char *utf8dir;
if ( chdir( fsSelectedFile ) != 0 ) return;
fsSelectedFile=fsThatDir;
CheckDir( fsFNameList );
- gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),(unsigned char *)get_current_dir_name_utf8() );
+ utf8dir = get_current_dir_name_utf8();
+ gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),(unsigned char *)utf8dir );
+ g_free(utf8dir);
gtk_widget_grab_focus( fsFNameList );
return;
}
More information about the MPlayer-cvslog
mailing list