| 6.5.3 Step 4: Finish Up | ![[ToC]](toc.png)  ![[Index]](index.png)  ![[Skip Back]](skipback.png)  ![[Skip Fwd]](skipfwd.png)  ![[Prev]](prev.png)  ![[Up]](up.png)  ![[Next]](next.png)  | 
All that's left to do is free the node, update counters, and return the deleted item:
232. <Step 4: Finish up after RB deletion 232> = tree->rb_alloc->libavl_free (tree->rb_alloc, p); tree->rb_count–; tree->rb_generation++; return (void *) item;
This code is included in 220.