Huw Davies : msxml3: Re-initialise the variant so that VariantChangeType doesn' t free the user string.

Alexandre Julliard julliard at winehq.org
Wed Nov 16 12:46:46 CST 2011


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Nov 16 13:18:49 2011 +0000

msxml3: Re-initialise the variant so that VariantChangeType doesn't free the user string.

---

 dlls/msxml3/httprequest.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
index 32cfc2c..2385d18 100644
--- a/dlls/msxml3/httprequest.c
+++ b/dlls/msxml3/httprequest.c
@@ -706,6 +706,7 @@ static HRESULT WINAPI httprequest_open(IXMLHTTPRequest *iface, BSTR method, BSTR
     if (hr == S_OK)
         This->user = V_BSTR(&str);
 
+    VariantInit(&str);
     hr = VariantChangeType(&str, &password, 0, VT_BSTR);
     if (hr == S_OK)
         This->password = V_BSTR(&str);




More information about the wine-cvs mailing list