Commit 74ed392f authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

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

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