Module: wine Branch: master Commit: 11470a7763afc1404a830a5ad1c53f65806f5a9a URL: https://source.winehq.org/git/wine.git/?a=commit;h=11470a7763afc1404a830a5ad...
Author: Sven Baars sven.wine@gmail.com Date: Fri Oct 4 21:58:42 2019 +0200
wbemprox: Fix a leak on error path (Coverity).
Signed-off-by: Sven Baars sven.wine@gmail.com Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 0f7eada9af..f46dcd922f 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -57,7 +57,11 @@ HRESULT create_view( enum view_type type, const WCHAR *path, const struct keywor struct table *table = grab_table( class ); HRESULT hr;
- if (table && (hr = append_table( view, table )) != S_OK) return hr; + if (table && (hr = append_table( view, table )) != S_OK) + { + heap_free( view ); + return hr; + } view->proplist = proplist; view->cond = cond; break;