bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] Core dump in gtkgame.c DestroyHint


From: Jim Segrave
Subject: [Bug-gnubg] Core dump in gtkgame.c DestroyHint
Date: Tue, 23 Jul 2002 23:36:07 +0200
User-agent: Mutt/1.2.5i

I'm getting a consistent core dump on a hint page. It appears to be in
DestroyHint, which is trying to free the Move list and match list
items. The enclosed patch against 
 * $Id: gtkgame.c,v 1.190 2002/07/21 20:54:15 thyssen Exp $
should fix things by avoiding the free()s if the items aren't malloced
yet:

--- gtkgame.c   Tue Jul 23 23:23:10 2002
+++ gtkgame.c.orig      Sun Jul 21 22:54:15 2002
@@ -4597,13 +4474,9 @@
 
     hintdata *phd = gtk_object_get_user_data( GTK_OBJECT( pwHint ) );
 
-       if (phd->pml) {
-         if (phd->pml->amMoves)
-               free( phd->pml->amMoves );
-
-         free( phd->pml );
-    }
-
+    free( phd->pml->amMoves );
+    free( phd->pml );
+    
     pwHint = NULL;
 }
 

-- 
Jim Segrave           address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]