[code] d->str

From: Andrey Fidrya (andrey@alex-ua.com)
Date: 05/14/99


From comm.c, close_socket():
===
  if (d->character) {
    /*
     * Plug memory leak, from Eric Green.
     */
    if (PLR_FLAGGED(d->character, PLR_MAILING) && d->str) {
      if (*(d->str))
        free(*(d->str));
      free(d->str);
    }
===
But I think it doesn't matter if player is mailing or reading a note... If
he lost his link, pager text must be freed... The same applies to
showstr_vector & other variables that are dynamically allocated - I think
they must be freed in close_socket before freeing up the descriptor.
Is it safe to rewrite it this way?  :
===
  /*
   * Plug memory leak, from Eric Green.
   */
  if (d->str) {
    if (*(d->str))
      free(*(d->str));
    free(d->str);
  }
  if (d->character) {
===

Zmey // 3MoonsWorld (rmud.net.ru:4000)


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



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