Fix free on NULL.