Commit 7ca31e83 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

ole32: Repair leak on error path.

parent a18fc6ec
...@@ -3586,9 +3586,13 @@ BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks( ...@@ -3586,9 +3586,13 @@ BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks(
} while (cbTotalRead.QuadPart < size.QuadPart); } while (cbTotalRead.QuadPart < size.QuadPart);
HeapFree(GetProcessHeap(),0,buffer); HeapFree(GetProcessHeap(),0,buffer);
size.u.HighPart = 0;
size.u.LowPart = 0;
if (FAILED(resRead) || FAILED(resWrite)) if (FAILED(resRead) || FAILED(resWrite))
{ {
ERR("conversion failed: resRead = 0x%08x, resWrite = 0x%08x\n", resRead, resWrite); ERR("conversion failed: resRead = 0x%08x, resWrite = 0x%08x\n", resRead, resWrite);
BlockChainStream_SetSize(bbTempChain, size);
BlockChainStream_Destroy(bbTempChain); BlockChainStream_Destroy(bbTempChain);
return NULL; return NULL;
} }
...@@ -3597,8 +3601,6 @@ BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks( ...@@ -3597,8 +3601,6 @@ BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks(
* Destroy the small block chain. * Destroy the small block chain.
*/ */
propertyIndex = (*ppsbChain)->ownerPropertyIndex; propertyIndex = (*ppsbChain)->ownerPropertyIndex;
size.u.HighPart = 0;
size.u.LowPart = 0;
SmallBlockChainStream_SetSize(*ppsbChain, size); SmallBlockChainStream_SetSize(*ppsbChain, size);
SmallBlockChainStream_Destroy(*ppsbChain); SmallBlockChainStream_Destroy(*ppsbChain);
*ppsbChain = 0; *ppsbChain = 0;
......
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