Split from #44993. For packets with a pre-send hook, an extra packet copy is allocated (on the heap), so that the pre-send hook can modify it without changing the original packet passed in from outside. This packet should instead be declared locally, to avoid issues with freeing the allocated memory.
Split from #44993. For packets with a pre-send hook, an extra packet copy is allocated (on the heap), so that the pre-send hook can modify it without changing the original packet passed in from outside. This packet should instead be declared locally, to avoid issues with freeing the allocated memory.