Adjust cap_free()