src/lib/message.c
void free_msgs_res(MSGS *msgs)
{
   DEST *d, *old;

   /* Walk down the message chain releasing allocated buffers */
   for (d=msgs->dest_chain; d; ) {
      if (d->where) {
         free(d->where);
         d->where = NULL;
      }
      if (d->mail_cmd) {
         free(d->mail_cmd);
         d->mail_cmd = NULL;
      }
      old = d;                        /* save pointer to release */
      d = d->next;                    /* point to next buffer */
      free(old);                      /* free the destination item */
   }
   msgs->dest_chain = NULL;
   free(msgs);                        /* free the head */
}
/*
 * Free memory associated with Messages resource
 */
Free memory associated with Messages resource
Free memory associated with Messages resource
void free_msgs_res(MSGS *msgs)
{
   DEST *d, *old;
   for (d=msgs->dest_chain; d; ) {
      if (d->where) {
         free(d->where);
         d->where = NULL;
      }
      if (d->mail_cmd) {
         free(d->mail_cmd);
         d->mail_cmd = NULL;
      }
      old = d;                        
      d = d->next;                    
      free(old);                      
   }
   msgs->dest_chain = NULL;
   free(msgs);                        
}
void free_msgs_res ( MSGS * msgs ) { DEST * d , * old ; for ( d = msgs -> dest_chain ; d ; ) { if ( d -> where ) { free ( d -> where ) ; d -> where = NULL ; } if ( d -> mail_cmd ) { free ( d -> mail_cmd ) ; d -> mail_cmd = NULL ; } old = d ; d = d -> next ; free ( old ) ; } msgs -> dest_chain = NULL ; free ( msgs ) ; }
Free memory associated with Messages resource
Free memory associated with Messages resource
/* Walk down the message chain releasing allocated buffers */ /* save pointer to release */ /* point to next buffer */ /* free the destination item */ /* free the head */