atl100: Fix a mem leak on an error path (Smatch).
Michael Stefaniuc
mstefani at redhat.de
Fri Jan 4 17:20:57 CST 2013
---
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));
--
1.7.6.5
More information about the wine-patches
mailing list