On 2011-07-05 at 15:05, z...@excite.it wrote: > void my_gtk_entry_set_text(GtkEntry *entry, char *data) > { > char *tmp; > > if (!data) data = ""; > > if (g_utf8_validate(data, -1, NULL) != TRUE) { > tmp = g_locale_to_utf8(data, -1, NULL, NULL, NULL); > gtk_entry_set_text(entry, tmp); > xfree(&tmp); ^^^^^^^^^^^^
agh! g_locale_to_utf8() returns memory allocated through the GLib API; you need to call g_free() to free it. *do not* mix GLib's memory allocation functions with other allocation functions. ciao, Emmanuele. -- W: http://www.emmanuelebassi.name B: http://blogs.gnome.org/ebassi _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list