Module: wine Branch: master Commit: 078f4dcd44d432dcb8db59612f34d24d41796373 URL: https://gitlab.winehq.org/wine/wine/-/commit/078f4dcd44d432dcb8db59612f34d24...
Author: Alex Henrie alexhenrie24@gmail.com Date: Sun Jun 18 22:34:21 2023 -0600
wbemprox: Fix memory leak on error path in enum_key (scan-build).
---
dlls/wbemprox/reg.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/wbemprox/reg.c b/dlls/wbemprox/reg.c index cd7db81aed7..cdfb5d28007 100644 --- a/dlls/wbemprox/reg.c +++ b/dlls/wbemprox/reg.c @@ -186,6 +186,7 @@ static HRESULT enum_key( HKEY root, const WCHAR *subkey, VARIANT *names, IWbemCo if (!(tmp = realloc( strings, count * sizeof(BSTR) ))) { RegCloseKey( hkey ); + free( strings ); return E_OUTOFMEMORY; } strings = tmp;