Michael Stefaniuc : atl100: Fix a mem leak on an error path (Smatch).
Alexandre Julliard
julliard at winehq.org
Mon Jan 7 13:42:19 CST 2013
Module: wine
Branch: master
Commit: 4bdb5b55ec0ff92a37c5d4322778eb2a16058388
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4bdb5b55ec0ff92a37c5d4322778eb2a16058388
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Sat Jan 5 00:20:57 2013 +0100
atl100: Fix a mem leak on an error path (Smatch).
---
dlls/atl100/atl.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/atl100/atl.c b/dlls/atl100/atl.c
index 4e2ba9f..61477ae 100644
--- a/dlls/atl100/atl.c
+++ b/dlls/atl100/atl.c
@@ -331,8 +331,10 @@ HRESULT WINAPI AtlLoadTypeLib(HINSTANCE inst, LPCOLESTR lpszIndex,
return E_OUTOFMEMORY;
path_len = GetModuleFileNameW(inst, path, MAX_PATH);
- if(!path_len)
+ if(!path_len) {
+ heap_free(path);
return HRESULT_FROM_WIN32(GetLastError());
+ }
if(index_len)
memcpy(path+path_len, lpszIndex, (index_len+1)*sizeof(WCHAR));
More information about the wine-cvs
mailing list