[MPlayer-dev-eng] [PATCH] gmplayer fsFileSelect related fixes

Rich Felker dalias at aerifal.cx
Mon Apr 9 08:30:25 CEST 2007


On Mon, Apr 09, 2007 at 10:11:21AM +0400, Sergey Pinaev wrote:
> On Sun, 08 Apr 2007 22:52:05 +1100
> Vadim Pisarev <plv at farpost.com> wrote:
> 
> > -   gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),(unsigned char *)get_current_dir_name() );
> > +   gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),(unsigned char *)g_filename_to_utf8(get_current_dir_name(), -1, NULL, NULL, NULL) );
> 
> and who will free memory allocated by g_filename_to_utf8() ? Pushkin? =)

It uses a static buffer. It's intended only for immediate printing
like here, nothing else.

> (btw, afaiu get_current_dir_name() returns malloc()ed string, that should
> be free()d too)

If so then that should be fixed..

Rich



More information about the MPlayer-dev-eng mailing list