|
From: | Teun Burgers |
Subject: | [gnugo-devel] Re: patch: malloc(0) and array bound violation |
Date: | Sat, 14 Aug 2004 11:38:18 +0200 |
User-agent: | Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) |
See http://lists.gnu.org/archive/html/gnugo-devel/2004-06/msg00110.html This is still not fixed. Paul wrote:
- free(list->pattern_list); - free(list->pattern_heap); + free(list->pattern_list); list->pattern_list = NULL; + free(list->pattern_heap); list->pattern_heap = NULL; I assume this is done to make the function reentrant. But I don't understand what for?
The free command leaves the address of the allocated memory intact. The settings to NULL are not necessary, but just a precaution against any future re-freeing or re-using freed memory. Teun
[Prev in Thread] | Current Thread | [Next in Thread] |