fix illegal packet free.