Fix packet memory leak