Esempio n. 1
0
File: kheader.c Progetto: klopp/knet
void hdr_Destroy( msg_Headers headers )
{
    ldestroy( headers->mail );
    ldestroy( headers->text );
    headers->text = headers->mail = NULL;
    Free( headers );
}
Esempio n. 2
0
/*
 * Free mount-specific data.
 */
static void
lo_freevfs(struct vfs *vfsp)
{
    struct loinfo *li = vtoli(vfsp);

    ldestroy(li);
    kmem_free(li, sizeof (struct loinfo));
}
Esempio n. 3
0
File: kheader.c Progetto: klopp/knet
static void del_Header( void * ptr )
{
    if( ptr )
    {
        msg_Header header = (msg_Header)ptr;
        Free( header->name );
        ldestroy( header->values );
    }
}
Esempio n. 4
0
/*--------------------------------------------------
|  ldestroy_cb
|
|  destroy an existing list data structure, calling
|  the user routine 'ucleanup' on the data pointer
|  of each list element.  Allows the user to free
|  up a list data structure and have this routine
|  call their function to free up each list element
|  at the same time.
 --------------------------------------------------*/
void 
ldestroy_cb ( LISTID lid, void (*ucleanup)(void * data_ptr) )
{
  LIST * l;
  LISTNODE * ln;

  l = (LIST *)lid;

  CKLMAGIC(l);

  ln = l->top;
  while (ln != NULL) {
    ucleanup ( ln->data );
    ln = ln->next;
  }

  ldestroy ( l );
}