It's ok to pass NULL to free()