bug in testgtk.c in gtk+-1.1.2
- From: Martin Pool <mbp wistful humbug org au>
- To: gtk-devel-list lists redhat com
- Subject: bug in testgtk.c in gtk+-1.1.2
- Date: Tue, 6 Oct 1998 18:14:33 +1000
When gtk+-1.1.2 is compiled with --enable-mem-check, the 'Tree' test
in testgtk crashes.
I think the bug is that the program tries to allocate memory with
g_malloc() and to free it with free() rather than g_free(): when
mem-check is enabled, they're not the same. This is fixed by the
attached patch.
--
Martin Pool
--- testgtk.c.~1~ Sun Sep 6 09:34:26 1998
+++ testgtk.c Tue Oct 6 18:00:46 1998
@@ -1,5 +1,5 @@
/* GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ * Copyright (C) 1995-1998 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -1014,7 +1014,7 @@
/* free buttons structure associate at this tree */
tree_buttons = gtk_object_get_user_data(GTK_OBJECT(w));
- free(tree_buttons);
+ g_free (tree_buttons);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]