aboutsummaryrefslogtreecommitdiffstats
path: root/api/resource.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-12-17 19:00:25 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-12-17 19:00:25 +0100
commit7710ff187b5079d9f2573608b6cb33b15262b2b8 (patch)
tree3305e8bd73ab5300aa0467c8b59660b52205fd54 /api/resource.h
parentversion: bump (diff)
downloadwintun-7710ff187b5079d9f2573608b6cb33b15262b2b8.tar.xz
wintun-7710ff187b5079d9f2573608b6cb33b15262b2b8.zip
api: close private namespace when unloading DLL
Prior, people making calls to LoadLibrary/FreeLibrary would experience a failure to create or open adapters, because the private namespace was already loaded into the process and not cleaned up on DLL detachment. While this pattern is probably a misuse of the library, we should still support cleaning that up. This commit makes the right calls to free the boundary descriptor and close the private namespace. It does not, however, destroy the private namespace using the flag on the second parameter, in case of races with other processes. Reported-by: Brad Spencer <bspencer@blackberry.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'api/resource.h')
0 files changed, 0 insertions, 0 deletions