Re: Possible memory leak?

From: Daniel A. Koepke (
Date: 12/01/01

On Sat, 1 Dec 2001, George Greer wrote:

> So create_entry() will not be called again:
>     if (GET_PFILEPOS(d->character) < 0)
>       GET_PFILEPOS(d->character) = create_entry(GET_PC_NAME(d->character));

...then why does create_entry() check for an existing entry in the player
table?  There may be a reason for it, but I can't think of one which would
make it okay to orphan the memory for the name in the player table.

Then again, as you say, it may never be called in this case -- in which
case, create_entry() should be simplified to remove the
get_ptable_by_name() check.


   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 06/24/03 PDT