diff --git a/cfg/windows.cfg b/cfg/windows.cfg
index 343e12b3906..7020162805a 100644
--- a/cfg/windows.cfg
+++ b/cfg/windows.cfg
@@ -7191,7 +7191,7 @@ HFONT CreateFont(
-
+
diff --git a/test/cfg/windows.cpp b/test/cfg/windows.cpp
index 5951cb74c07..a07e1b09365 100644
--- a/test/cfg/windows.cpp
+++ b/test/cfg/windows.cpp
@@ -54,6 +54,13 @@ void invalid_socket()
// cppcheck-suppress resourceLeak
}
+void invalid_socket_noleak(int a, int t, int p) { // #14155
+ SOCKET s = socket(a, t, p);
+ if (s == INVALID_SOCKET)
+ return;
+ closesocket(s);
+}
+
void resourceLeak_OpenThread(const DWORD dwDesiredAccess, const BOOL bInheritHandle, const DWORD dwThreadId)
{
HANDLE proc = OpenThread(dwDesiredAccess, bInheritHandle, dwThreadId);