]> The Tcpdump Group git mirrors - libpcap/commit
Move all cleanup actions to pcap_cleanup_live_common
authorDaniel Miller <[email protected]>
Fri, 12 Nov 2021 22:04:34 +0000 (16:04 -0600)
committerGuy Harris <[email protected]>
Sat, 13 Nov 2021 03:11:21 +0000 (19:11 -0800)
commitd655d71467e0931d2ff071a3506801064863c31f
tree94611ca3e470243fed64bbde0f394c45ff7fc443
parent48bb99f21516aa41df69d7cab3f56ba53172c637
Move all cleanup actions to pcap_cleanup_live_common

pcap-npf.c's pcap_cleanup_npf() expects to be able to access opt.device
in order to restore the monitor mode. This results in a use-after-free
when calling pcap_close(). Instead, do this free in
pcap_cleanup_live_common, just like all the others.

(cherry picked from commit e333a6044f7d2d3225a6a22205b6b7c1e389945f)
pcap.c