/** * Reset header object, for new header parsing. */ void header_reset(header_t *o) { header_check(o); if (o->headers != NULL) { htable_foreach_remove(o->headers, free_header_data, NULL); htable_free_null(&o->headers); } slist_free_all(&o->fields, cast_to_free_fn(hfield_free)); o->flags = o->size = o->num_lines = 0; }
/** * Free the pmsg list, including the list container, nullifying its pointer. */ void pmsg_slist_free_all(slist_t **slist_ptr) { slist_free_all(slist_ptr, cast_to_free_fn(pmsg_free)); }