Module: wine Branch: master Commit: dec2e818c0227d5373fae0a9da133b7a71a0b3b8 URL: https://gitlab.winehq.org/wine/wine/-/commit/dec2e818c0227d5373fae0a9da133b7...
Author: Alistair Leslie-Hughes leslie_alistair@hotmail.com Date: Fri Jun 7 21:14:13 2024 +1000
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; }