[Openvpn-devel,v2] openvpnserv: Use same variant of UuidToString and RpcStringFree

Message ID 20260514091918.18197-1-gert@greenie.muc.de
State New
Headers show
Series [Openvpn-devel,v2] openvpnserv: Use same variant of UuidToString and RpcStringFree | expand

Commit Message

Gert Doering May 14, 2026, 9:19 a.m. UTC
From: Frank Lichtenheld <frank@lichtenheld.com>

Probably not a real issue since it should always use the
W version in our case, but still unclean.

Fixes a cppcheck complaint.

Change-Id: I3d391016dcd3c66e58f3f05b356bcd419224acb1
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Heiko Hund <heiko@openvpn.net>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1671
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1671
This mail reflects revision 2 of this Change.

Acked-by according to Gerrit (reflected above):
Heiko Hund <heiko@openvpn.net>

Comments

Gert Doering May 14, 2026, 2:49 p.m. UTC | #1
I have changed the commit messagte to only talk about "RpcStringFree()",
as there is no mention of UuidToString here...

Test compiled on MinGW.

Your patch has been applied to the master branch.

commit 2b8afc6c685f4e451fd0fa5aa37f18147520dfc1
Author: Frank Lichtenheld
Date:   Thu May 14 11:19:12 2026 +0200

     openvpnserv: Use same variant of UuidToString and RpcStringFree

     Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
     Acked-by: Heiko Hund <heiko@openvpn.net>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1671
     Message-Id: <20260514091918.18197-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36915.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
index e25c511..bd310e4 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive.c
@@ -3484,7 +3484,7 @@ 
     swprintf(ovpn_pipe_name, _countof(ovpn_pipe_name),
              L"\\\\.\\pipe\\" _L(PACKAGE) L"%ls\\service_%lu_%ls", service_instance,
              GetCurrentThreadId(), pipe_uuid_str);
-    RpcStringFree(&pipe_uuid_str);
+    RpcStringFreeW(&pipe_uuid_str);
 
     /* make a security descriptor for the named pipe with access
      * restricted to the user and SYSTEM