fix: invalid report while freeing null pointer