unix mail cleanup bulletproofing
If the recently added release routine ever gets called twice for some reason, don't free already freed memory, or worse, was freed here and then allocated for something else which is still in use.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mail.c $NHDT-Date: 1451955080 2016/01/05 00:51:20 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.25 $ */
|
||||
/* NetHack 3.6 mail.c $NHDT-Date: 1464222344 2016/05/26 00:25:44 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.27 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -84,7 +84,7 @@ void
|
||||
free_maildata()
|
||||
{
|
||||
if (mailbox)
|
||||
free(mailbox);
|
||||
free((genericptr_t) mailbox), mailbox = (char *) 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user