Attention is currently required from: osmith, pespin, lynxis lazus. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-uecups/+/27739 )
Change subject: Fix use-after-free by tun thread after tun obj destroyed ......................................................................
Patch Set 2: Code-Review-1
(1 comment)
File daemon/tun_device.c:
https://gerrit.osmocom.org/c/osmo-uecups/+/27739/comment/c8cde187_2997d548 PS2, Line 204: pthread_cleanup_pop(tun_device_pthread_cleanup_routine); man pthread_cleanup_pop reads:
"""The pthread_cleanup_pop() function removes the routine at the top of the stack of clean-up handlers, and optionally executes it if execute is nonzero."""
So it will always pop the last cleanup handler, the only choice you have is if you want it to be executed or not.
I also don't see how you can reach this code (at the moment), there's no break in the while loop.