Commit 8e51ab35 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

shell32: Fix a memory leak in Stream_WriteLocationInfo.

parent 1a67b1f5
......@@ -977,6 +977,7 @@ static HRESULT Stream_WriteLocationInfo( IStream* stm, LPCWSTR path,
LOCATION_INFO *loc;
LPSTR szLabel, szPath, szFinalPath;
ULONG count = 0;
HRESULT hr;
TRACE("%p %s %p\n", stm, debugstr_w(path), volume);
......@@ -1018,7 +1019,10 @@ static HRESULT Stream_WriteLocationInfo( IStream* stm, LPCWSTR path,
szPath, path_size, NULL, NULL );
szFinalPath[0] = 0;
return IStream_Write( stm, loc, total_size, &count );
hr = IStream_Write( stm, loc, total_size, &count );
HeapFree(GetProcessHeap(), 0, loc);
return hr;
}
static EXP_DARWIN_LINK* shelllink_build_darwinid( LPCWSTR string, DWORD magic )
......
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