Jacek Caban : mshtml: Always initialize output in exec_fontname.

Alexandre Julliard julliard at winehq.org
Tue Nov 20 10:54:56 CST 2007


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Nov 20 01:50:19 2007 +0100

mshtml: Always initialize output in exec_fontname.

---

 dlls/mshtml/editor.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c
index 827fa07..53938e9 100644
--- a/dlls/mshtml/editor.c
+++ b/dlls/mshtml/editor.c
@@ -586,6 +586,9 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
         DWORD len;
         nsresult nsres;
 
+        V_VT(out) = VT_BSTR;
+        V_BSTR(out) = NULL;
+
         nsparam = create_nscommand_params();
 
         nsres = get_ns_command_state(This->nscontainer, NSCMD_FONTFACE, nsparam);
@@ -600,7 +603,6 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
         MultiByteToWideChar(CP_ACP, 0, stra, -1, strw, -1);
         nsfree(stra);
 
-        V_VT(out) = VT_BSTR;
         V_BSTR(out) = SysAllocString(strw);
         mshtml_free(strw);
     }




More information about the wine-cvs mailing list