void delete_proplist(PropPtr p) { if (!p) return; delete_proplist(AVL_LF(p)); delete_proplist(PropDir(p)); delete_proplist(AVL_RT(p)); free_propnode(p); }
static PropPtr delnode(char *key, PropPtr avl) { PropPtr save; save = remove_propnode(key, &avl); if (save) free_propnode(save); return avl; }
/** * Recursively deletes an entire proplist AVL with 'p' as the root, * and frees 'p' itself. * * @param p The proplist to delete. */ void delete_proplist(PropPtr p) { if (!p) return; delete_proplist(p->left); delete_proplist(PropDir(p)); delete_proplist(p->right); free_propnode(p); }