I think should release it before assigning NULL.