Wasn't freeing the ip memory.