fix a mem leak in packet queue