! ras..bug?

From: ;P (siv@CYBERENET.NET)
Date: 11/03/97


i added the code that george posted that created the command
history...then when i was running my mud through gdb, i got errors that
were along the lines of:

circle in free: chunk is already free

i traced the offending lines back to this
  if (d->history) {
    int cnt;
    for (cnt = 0; cnt < HISTORY_SIZE; cnt++)
      if (*d->history)
-->     free(*d->history);   <--
    free(d->history);
  }

so i figured i'd change it to something like:
   if (*d->history[cnt])
     free(d->history[cnt]);

but that crashes my mud..should it be:
     free(*d->history[cnt]);

or is it something that i'm just not seeing?

siv


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST