]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Cleanup: Close duplicated handles in interactive service
authorSelva Nair <selva.nair@gmail.com>
Thu, 29 Dec 2022 18:27:39 +0000 (13:27 -0500)
committerGert Doering <gert@greenie.muc.de>
Sat, 31 Dec 2022 09:17:32 +0000 (10:17 +0100)
commite47c88bbc593f99529712229fae65470a2e4e0a8
tree9c470fc6a2bb91c674b2a3dc04896f7acd47042a
parentfc96b8793ca94c23e5dc229aa1455d747cef4766
Cleanup: Close duplicated handles in interactive service

Several handles from openvpn.exe are duplicated in the
service for registering ring buffer memory maps with the
driver. These handles are not required after registration,
as all access is through handles in openvpn.exe. Only the
map base address (send_ring, rceive_ring) need be retained
for later unmapping.

Use local variables for duplicated handles and close them
soon after use.

The struct ring_buffer_handles_t is renamed to ring_buffer_maps_t
as there are no handles in there any longer.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <20221229182739.1477336-2-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25863.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit a10564c71608dca6172a89dc458e6e23254d600b)
src/openvpnserv/interactive.c