[MPlayer-dev-eng] [PATCH] gmplayer fsFileSelect related fixes
Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Apr 10 08:17:51 CEST 2007
On Tue, Apr 10, 2007 at 01:29:25PM +1100, Vadim Pisarev wrote:
> Sergey Pinaev wrote:
> > On Mon, 9 Apr 2007 06:51:39 -0400
> > Rich Felker <dalias at aerifal.cx> wrote:
> >>>>> (btw, afaiu get_current_dir_name() returns malloc()ed string, that should
> >>>>> be free()d too)
> >>>> If so then that should be fixed..
> >>> get_current_dir_name, which is only prototyped if _GNU_SOURCE is
> >>> defined, will malloc(3) an array big enough to hold the current direc-
> >>> tory name.
> >> Uhg, so this is some nasty glibcism? Replace it with something
> >> portable then, like getcwd().
> > gui uses gtk/glib, so for consistency it should use g_get_current_dir() =)
> So, should i replace get_current_dir_name() with g_get_current_dir()
> everywhere in Gui/mplayer.gtk/fs.c ?
Do you still need g_filename_to_utf8 then? If yes, getcwd might allow
fixing it without adding a lot of frees (on the other you're supposed to
check for a NULL return value then, so not really better).
More information about the MPlayer-dev-eng