]> 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:16:14 +0000 (10:16 +0100)
commita10564c71608dca6172a89dc458e6e23254d600b
tree22a99b0e61e28dd8cd1b410432bbab82fbce522f
parent6ea9cf8146b1d72aa6a4790bc3ac2b99562b2cac
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>
src/openvpnserv/interactive.c