[PATCH] wbemprox: fixed a memory leak in get_sd (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sun Sep 21 07:23:08 CDT 2014
1232721 Resource leak
---
dlls/wbemprox/security.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/wbemprox/security.c b/dlls/wbemprox/security.c
index 0ff6c0b..d3057e0 100644
--- a/dlls/wbemprox/security.c
+++ b/dlls/wbemprox/security.c
@@ -120,8 +120,11 @@ static HRESULT get_sd( SECURITY_DESCRIPTOR **sd, DWORD *size )
if (SUCCEEDED(hr))
{
- if (!MakeSelfRelativeSD(&absolute_sd, *sd, size))
+ if (!MakeSelfRelativeSD(&absolute_sd, *sd, size)) {
+ HeapFree( GetProcessHeap(), 0, *sd );
+ *sd = NULL;
hr = E_FAIL;
+ }
}
return hr;
--
1.8.4.5
More information about the wine-patches
mailing list