Misha Koshelev : urlmon/tests: Don't proceed with POST operation (
that will fail) if we run out of memory.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jul 26 06:37:23 CDT 2007
Module: wine
Branch: master
Commit: c4f1adb7ccb8e6e4ba462712daee2bbacebae930
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c4f1adb7ccb8e6e4ba462712daee2bbacebae930
Author: Misha Koshelev <mk144210 at bcm.edu>
Date: Thu Jul 26 00:03:25 2007 -0500
urlmon/tests: Don't proceed with POST operation (that will fail) if we run out of memory.
---
dlls/urlmon/tests/protocol.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c
index a9d13d1..45ba841 100644
--- a/dlls/urlmon/tests/protocol.c
+++ b/dlls/urlmon/tests/protocol.c
@@ -159,6 +159,7 @@ static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate2 *iface,
addl_headers = CoTaskMemAlloc(sizeof(wszHeaders));
if (!addl_headers)
{
+ http_post_test = FALSE;
skip("Out of memory\n");
return E_OUTOFMEMORY;
}
@@ -504,18 +505,19 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfB
if (http_post_test)
{
- pbindinfo->dwBindVerb = BINDVERB_POST;
- pbindinfo->stgmedData.tymed = TYMED_HGLOBAL;
/* Must be GMEM_FIXED, GMEM_MOVABLE does not work properly
* with urlmon on native (Win98 and WinXP) */
pbindinfo->stgmedData.hGlobal = GlobalAlloc(GPTR, sizeof(szPostData));
if (!pbindinfo->stgmedData.hGlobal)
{
+ http_post_test = FALSE;
skip("Out of memory\n");
return E_OUTOFMEMORY;
}
lstrcpy((LPSTR)pbindinfo->stgmedData.hGlobal, szPostData);
pbindinfo->cbstgmedData = sizeof(szPostData)-1;
+ pbindinfo->dwBindVerb = BINDVERB_POST;
+ pbindinfo->stgmedData.tymed = TYMED_HGLOBAL;
}
return S_OK;
More information about the wine-cvs
mailing list