[PATCH] gnome-games/freecell fix
- From: ahaas neosoft com
- To: gnome-devel-list gnome org
- Subject: [PATCH] gnome-games/freecell fix
- Date: Sun, 3 Dec 2000 11:33:08 -0600
Hi.
Freecell always bombed out when I started it, with complaints about
freeing bad memory. A few minutes with ElectricFence pointed out
the cause.
The g_free() calls should be free() - we're freeing memory allocated
by malloc() in a scandir() call. My glib with built with memory debugging
options, so g_free()/free() calls don't mix well. Rebuilding with
this patch was successful, and running under ElectricFence was no
problem. Now just to win the game ...
Please apply - it should close numerous bugs with freecell listed
in the gnome-bug page.
Thanks to everyone working on gnome.
Art Haas
--- gdk-card-image.c.orig Wed Feb 24 12:34:24 1999
+++ gdk-card-image.c Sat Dec 2 20:19:48 2000
@@ -232,9 +232,9 @@
dir->file[i].cols = dir->cols;
dir->file[i].rows = dir->rows;
dir->file[i].rotate = dir->rotate;
- g_free (de[i]);
+ free (de[i]);
}
- g_free (de);
+ free (de);
}
for (i = 0; i < dir->nfiles; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]