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

Alexandre Julliard julliard at winehq.org
Thu Feb 16 15:12:29 CST 2017


Module: wine
Branch: master
Commit: 74ed392f85834555bc1f5fb235ccb54abaffbb38
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=74ed392f85834555bc1f5fb235ccb54abaffbb38

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Sat Feb 11 17:40:11 2017 -0600

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

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/storage.dll16/storage.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/storage.dll16/storage.c b/dlls/storage.dll16/storage.c
index 2ce3571..cac616c 100644
--- a/dlls/storage.dll16/storage.c
+++ b/dlls/storage.dll16/storage.c
@@ -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;




More information about the wine-cvs mailing list