From dec2e818c0227d5373fae0a9da133b7a71a0b3b8 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 7 Jun 2024 21:14:13 +1000 Subject: [PATCH] odbccp32: Stop handle leak on error paths. --- dlls/odbccp32/odbccp32.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c index 62e35e85f75..95bfb90781e 100644 --- a/dlls/odbccp32/odbccp32.c +++ b/dlls/odbccp32/odbccp32.c @@ -1003,6 +1003,7 @@ static void write_registry_values(const WCHAR *regkey, const WCHAR *driver, cons value = malloc(len * sizeof(WCHAR)); if(!value) { + RegCloseKey(hkeydriver); ERR("Out of memory\n"); return; } @@ -1015,6 +1016,7 @@ static void write_registry_values(const WCHAR *regkey, const WCHAR *driver, cons value = calloc(1, (lstrlenW(divider)+1) * sizeof(WCHAR)); if(!value) { + RegCloseKey(hkeydriver); ERR("Out of memory\n"); return; } -- 2.11.4.GIT