From 230d1503506751033ec5a8730b6b385b097f54fd Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Mon, 3 Jul 2006 14:21:21 +0000 Subject: [PATCH] region memory wrote on Tuesday, July 27, 2004 at 06:46:15 > In the region.c function rest_regions allocates storage for the possible > enter_msg and leave_msg strings. But the function free_region does not relese > this storage. Also ensures that some code that is currently ifdef'd out makes copies of the strings into memory from alloc() to ensure that no problems with free() result if the function gets passed a literal string. --- doc/fixes34.4 | 1 + src/region.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index e3c785195..8675fd471 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -240,6 +240,7 @@ bypass "wait! there's a creature hidden there" when attacking a hidden monster remove makedefs.c dependency that time_t and long are the same size terminal window set to 21 lines can cause a crash during player selection menus; have bot() check for valid youmonst.data +free storage used to hold region messages in free_region() Platform- and/or Interface-Specific Fixes diff --git a/src/region.c b/src/region.c index d51ed315b..91ea28df0 100644 --- a/src/region.c +++ b/src/region.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)region.c 3.5 2006/06/27 */ +/* SCCS Id: @(#)region.c 3.5 2006/07/02 */ /* Copyright (c) 1996 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */