Module: wine Branch: stable Commit: 39d328e958faf7a685693c8635ff57b2ebdaaa25 URL: https://gitlab.winehq.org/wine/wine/-/commit/39d328e958faf7a685693c8635ff57b... Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Apr 20 16:18:20 2022 -0500 setupapi: Avoid leaking subKey in SETUPDI_AddDeviceInterfaces(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 93d8a86ce22c0295219cd709eecdee871c37f4b8) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/setupapi/devinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index ecc0b58ca5c..34beae23bdc 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -2281,8 +2281,8 @@ static void SETUPDI_AddDeviceInterfaces(struct device *device, HKEY key, (BYTE *)symbolicLink, &len); if (!l && dataType == REG_SZ) SETUPDI_SetInterfaceSymbolicLink(iface, symbolicLink); - RegCloseKey(subKey); } + RegCloseKey(subKey); } } /* Allow enumeration to continue */