Commit 69789d58 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

mpr: Fix some memory leaks.

parent 7bd0c43f
......@@ -1312,6 +1312,7 @@ DWORD WINAPI WNetGetResourceInformationA( LPNETRESOURCEA lpNetResource,
ret = _thunkNetResourceArrayAToW(lpNetResource, &count, lpNetResourceW, &size);
if (ret == WN_MORE_DATA)
{
HeapFree(GetProcessHeap(), 0, lpNetResourceW);
lpNetResourceW = HeapAlloc(GetProcessHeap(), 0, size);
if (lpNetResourceW)
ret = _thunkNetResourceArrayAToW(lpNetResource,
......@@ -1343,6 +1344,7 @@ DWORD WINAPI WNetGetResourceInformationA( LPNETRESOURCEA lpNetResource,
{
ret = _thunkNetResourceArrayWToA(lpBufferW,
&count, lpBuffer, cbBuffer);
HeapFree(GetProcessHeap(), 0, lpNetResourceW);
lpNetResourceW = lpBufferW;
size = sizeof(NETRESOURCEA);
size += WideCharToMultiByte(CP_ACP, 0, lpNetResourceW->lpRemoteName,
......
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