ole32: Remove directory entries from the tree before we free them.
The directory entry should still be valid as long as it's in the tree.
This commit is contained in:
parent
07b735682b
commit
fd993b7d9d
|
@ -1817,6 +1817,15 @@ static HRESULT WINAPI StorageImpl_DestroyElement(
|
||||||
parentPropertyId,
|
parentPropertyId,
|
||||||
typeOfRelation);
|
typeOfRelation);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Invalidate the property by zeroing its name member.
|
||||||
|
*/
|
||||||
|
propertyToDelete.sizeOfNameString = 0;
|
||||||
|
|
||||||
|
StorageImpl_WriteProperty(This->base.ancestorStorage,
|
||||||
|
foundPropertyIndexToDelete,
|
||||||
|
&propertyToDelete);
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1936,15 +1945,6 @@ static HRESULT deleteStorageProperty(
|
||||||
|
|
||||||
} while ((hr == S_OK) && (destroyHr == S_OK));
|
} while ((hr == S_OK) && (destroyHr == S_OK));
|
||||||
|
|
||||||
/*
|
|
||||||
* Invalidate the property by zeroing its name member.
|
|
||||||
*/
|
|
||||||
propertyToDelete.sizeOfNameString = 0;
|
|
||||||
|
|
||||||
StorageImpl_WriteProperty(parentStorage->base.ancestorStorage,
|
|
||||||
indexOfPropertyToDelete,
|
|
||||||
&propertyToDelete);
|
|
||||||
|
|
||||||
IStorage_Release(childStorage);
|
IStorage_Release(childStorage);
|
||||||
IEnumSTATSTG_Release(elements);
|
IEnumSTATSTG_Release(elements);
|
||||||
|
|
||||||
|
@ -1993,20 +1993,6 @@ static HRESULT deleteStreamProperty(
|
||||||
*/
|
*/
|
||||||
IStream_Release(pis);
|
IStream_Release(pis);
|
||||||
|
|
||||||
/*
|
|
||||||
* Invalidate the property by zeroing its name member.
|
|
||||||
*/
|
|
||||||
propertyToDelete.sizeOfNameString = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Here we should re-read the property so we get the updated pointer
|
|
||||||
* but since we are here to zap it, I don't do it...
|
|
||||||
*/
|
|
||||||
StorageImpl_WriteProperty(
|
|
||||||
parentStorage->base.ancestorStorage,
|
|
||||||
indexOfPropertyToDelete,
|
|
||||||
&propertyToDelete);
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue