--- - branch: MAIN date: Mon Aug 31 20:24:19 UTC 2020 files: - new: '1.38' old: '1.37' path: src/sys/net/if_wg.c pathrev: src/sys/net/if_wg.c@1.38 type: modified id: 20200831T202419Z.90e23a609e9506360d8e81d94324def7b83ac684 log: | wg: mbuf m_freem audit. 1. wg_handle_msg_data frees m but the other wg_handle_msg_* just take a pointer to the mbuf content and not m itself, so free m in those cases. 2. Can't trivially prove that the pcq is empty by the time wg_destroy_peer runs pcq_destroy, so let's explicitly purge it just in case. 3. If wg_send_udp isn't doing udp_send or udp6_output, it still has to free m in the !INET6 error branch for IPv6 packets. 4. After rumpuser_wg_send_peer or rumpuser_wg_send_user, we still need to free the mbuf. module: src subject: 'CVS commit: src/sys/net' unixtime: '1598905459' user: riastradh