buf: Remove return condition in detach()

Wasn't setting *len to zero if the buffer had no attached memory.