Fix memory leak by removing packet out