Module: wine Branch: master Commit: cb4d61efa185f495d4a9a371f8ea857bbe1e785e URL: https://gitlab.winehq.org/wine/wine/-/commit/cb4d61efa185f495d4a9a371f8ea857...
Author: Alex Henrie alexhenrie24@gmail.com Date: Mon Nov 28 21:50:39 2022 -0700
atl: Fix memory leak on error path in do_process_root_key (scan-build).
---
dlls/atl/registrar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/atl/registrar.c b/dlls/atl/registrar.c index 5e03b42132c..9009cd1c7cf 100644 --- a/dlls/atl/registrar.c +++ b/dlls/atl/registrar.c @@ -383,7 +383,7 @@ static HRESULT do_process_root_key(LPCOLESTR data, BOOL do_register) strbuf_init(&buf); hres = get_word(&iter, &buf); if(FAILED(hres)) - return hres; + goto done;
while(*iter) { if(!buf.len) { @@ -417,6 +417,8 @@ static HRESULT do_process_root_key(LPCOLESTR data, BOOL do_register) if(FAILED(hres)) break; } + +done: free(buf.str); return hres; }