dont pass a null ptr to free