ole32: Fix memory leak in ItemMonikerImpl_Save.

This commit is contained in:
Rob Shearman 2007-11-10 16:04:40 +00:00 committed by Alexandre Julliard
parent b75a33a214
commit a7bfdde975
1 changed files with 3 additions and 0 deletions

View File

@ -355,6 +355,9 @@ HRESULT WINAPI ItemMonikerImpl_Save(IMoniker* iface,
res=IStream_Write(pStm,&nameLength,sizeof(DWORD),NULL); res=IStream_Write(pStm,&nameLength,sizeof(DWORD),NULL);
res=IStream_Write(pStm,itemNameA,nameLength * sizeof(CHAR),NULL); res=IStream_Write(pStm,itemNameA,nameLength * sizeof(CHAR),NULL);
HeapFree(GetProcessHeap(), 0, itemNameA);
HeapFree(GetProcessHeap(), 0, itemDelimiterA);
return res; return res;
} }