rem: tmp = deathHandler; if (tmp==handler) { deathHandler = handler->next; free(handler); } else { while (tmp->next) { if (tmp->next==handler) { tmp->next=handler->next; free(handler); break; } tmp = tmp->next; } }
add: WMRemoveFromBag(deathHandlers, handler);  free(handler);
context: wDeleteDeathHandler(WMagicNumber id){    DeathHandler *tmp, *handler=(DeathHandler*)id;    if (!handler || !deathHandler)      return;    tmp = deathHandler;    if (tmp==handler) {	deathHandler = handler->next;	free(handler);    } else {	while (tmp->next) {	    if (tmp->next==handler) {		tmp->next=handler->next;		free(handler);		break;	    }	    tmp = tmp->next;	}    }}