storage.dll16: Set OpenStorage/OpenStream output to NULL on failure.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2017-02-11 17:40:11 -06:00 committed by Alexandre Julliard
parent 3085e73392
commit 74ed392f85
1 changed files with 4 additions and 0 deletions

View File

@ -1859,11 +1859,13 @@ HRESULT CDECL IStorage16_fnOpenStorage(IStorage16 *iface, LPCOLESTR16 pwcsName,
newpps = STORAGE_look_for_named_pps(&lpstg->str,This->stde.pps_dir,name);
if (newpps==-1) {
IStorage16_fnRelease(&lpstg->IStorage16_iface);
*ppstg = NULL;
return E_FAIL;
}
if (1!=STORAGE_get_pps_entry(&lpstg->str,newpps,&(lpstg->stde))) {
IStorage16_fnRelease(&lpstg->IStorage16_iface);
*ppstg = NULL;
return E_FAIL;
}
lpstg->ppsent = newpps;
@ -1899,11 +1901,13 @@ HRESULT CDECL IStorage16_fnOpenStream(IStorage16 *iface, LPCOLESTR16 pwcsName, v
newpps = STORAGE_look_for_named_pps(&lpstr->str,This->stde.pps_dir,name);
if (newpps==-1) {
IStream16_fnRelease(&lpstr->IStream16_iface);
*ppstm = NULL;
return E_FAIL;
}
if (1!=STORAGE_get_pps_entry(&lpstr->str,newpps,&(lpstr->stde))) {
IStream16_fnRelease(&lpstr->IStream16_iface);
*ppstm = NULL;
return E_FAIL;
}
lpstr->offset.u.LowPart = 0;