[PATCH] fix a memory leak in pack_ptr_list