[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Strange behavior of glib
- From: Soeren Sandmann <sandmann daimi au dk>
- To: Martin Bammer <e9525103 stud4 tuwien ac at>
- Cc: GTK App Dev List <gtk-app-devel-list gnome org>
- Subject: Re: Strange behavior of glib
- Date: 29 Apr 2003 02:59:54 +0200
Martin Bammer <e9525103@stud4.tuwien.ac.at> writes:
> Following code doesn't work. _name will be destroyed after the second line.
> Is this a bug in glib???
>
> g_message("%s", _name);
> if (_name) name = g_strdown(g_strdup(_name));
> g_message("%s", _name);
The fragment above should not result in _name being destroyed, but
it's unlikely that you have found a bug in glib.
One possibility is that you have some other bug (a double free()
perhaps) in your program causing the malloc() in g_strdup() to corrupt
the memory pointed to by _name.
Søren
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]