pointer was being free was not allocated