demux: use talloc for packets