ole32: Add error checking to StorageBaseImpl_CreateStream.
This commit is contained in:
parent
00dec58bb2
commit
1fab6e3515
|
@ -834,6 +834,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
|
||||||
StgStreamImpl* newStream;
|
StgStreamImpl* newStream;
|
||||||
DirEntry currentEntry, newStreamEntry;
|
DirEntry currentEntry, newStreamEntry;
|
||||||
DirRef currentEntryRef, newStreamEntryRef;
|
DirRef currentEntryRef, newStreamEntryRef;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("(%p, %s, %x, %d, %d, %p)\n",
|
TRACE("(%p, %s, %x, %d, %d, %p)\n",
|
||||||
iface, debugstr_w(pwcsName), grfMode,
|
iface, debugstr_w(pwcsName), grfMode,
|
||||||
|
@ -933,14 +934,22 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
|
||||||
/*
|
/*
|
||||||
* Create an entry with the new data
|
* Create an entry with the new data
|
||||||
*/
|
*/
|
||||||
StorageBaseImpl_CreateDirEntry(This, &newStreamEntry, &newStreamEntryRef);
|
hr = StorageBaseImpl_CreateDirEntry(This, &newStreamEntry, &newStreamEntryRef);
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Insert the new entry in the parent storage's tree.
|
* Insert the new entry in the parent storage's tree.
|
||||||
*/
|
*/
|
||||||
insertIntoTree(
|
hr = insertIntoTree(
|
||||||
This,
|
This,
|
||||||
This->storageDirEntry,
|
This->storageDirEntry,
|
||||||
newStreamEntryRef);
|
newStreamEntryRef);
|
||||||
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
StorageBaseImpl_DestroyDirEntry(This, newStreamEntryRef);
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Open the stream to return it.
|
* Open the stream to return it.
|
||||||
|
|
Loading…
Reference in New Issue