Commit 4bdb5b55 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

atl100: Fix a mem leak on an error path (Smatch).

parent 4a685ebe
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment