Marcus Meissner : wbemprox: Fixed a memory leak in get_sd (Coverity).
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Sep 22 15:01:13 CDT 2014
Module: wine
Branch: master
Commit: e0905d780e1d94a24659f76b59562d659066a15d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e0905d780e1d94a24659f76b59562d659066a15d
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Sun Sep 21 14:23:08 2014 +0200
wbemprox: Fixed a memory leak in get_sd (Coverity).
---
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;
More information about the wine-cvs
mailing list