do not free an invalid pointer