Module: wine Branch: master Commit: ea58ec849ff270feee0577d2c4ffd593f3eea25c URL: https://gitlab.winehq.org/wine/wine/-/commit/ea58ec849ff270feee0577d2c4ffd59...
Author: Alex Henrie alexhenrie24@gmail.com Date: Sun Jun 4 23:19:33 2023 -0600
wbemprox: Fix memory leak on error path in create_view (scan-build).
---
dlls/wbemprox/query.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c index 1b79523d66f..1087e271837 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -62,7 +62,11 @@ HRESULT create_view( enum view_type type, enum wbm_namespace ns, const WCHAR *pa free( view ); return hr; } - else if (!table && ns == WBEMPROX_NAMESPACE_LAST) return WBEM_E_INVALID_CLASS; + else if (!table && ns == WBEMPROX_NAMESPACE_LAST) + { + free( view ); + return WBEM_E_INVALID_CLASS; + } view->proplist = proplist; view->cond = cond; break;