aboutsummaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-10-06 09:38:44 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2019-10-06 12:37:51 +0000
commitfd52a3a429ba802be99d6d0d4101db9db99f5b11 (patch)
tree5974ad329490c92d4a1ce8a27ae8dbd947dbc76c /installer
parentinstaller: improve resource freeing flow (diff)
downloadwintun-fd52a3a429ba802be99d6d0d4101db9db99f5b11.tar.xz
wintun-fd52a3a429ba802be99d6d0d4101db9db99f5b11.zip
Ensure that buffers are unmapped on process exit and adapter deletion
Before duplicating a handle elsewhere and closing the original process would result in disaster. Also, it turns out that TunHaltEx can be called before the handles are all closed, so we need to unregister prior to freeing the ctx, lest disaster occurs. Finally, now that we have a few different things happening with registration and deregistration, we serialize all accesses with an eresource, a bit heavy-weight but sufficient. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'installer')
0 files changed, 0 insertions, 0 deletions