From 18aefb5dcfe51ac7854fd738708e0af693135ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= Date: Wed, 13 Nov 2024 19:32:43 +0200 Subject: [PATCH] mshtml: Use BSTR to store global prop's name. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gabriel Ivăncescu --- dlls/mshtml/htmlwindow.c | 4 ++-- dlls/mshtml/mshtml_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 731acd61cd7..8a7119c5451 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -3302,7 +3302,7 @@ static global_prop_t *alloc_global_prop(HTMLInnerWindow *This, global_prop_type_ This->global_prop_size = new_size; } - This->global_props[This->global_prop_cnt].name = wcsdup(name); + This->global_props[This->global_prop_cnt].name = SysAllocString(name); if(!This->global_props[This->global_prop_cnt].name) return NULL; @@ -3779,7 +3779,7 @@ static void HTMLWindow_destructor(DispatchEx *dispex) VariantClear(&This->performance); for(i = 0; i < This->global_prop_cnt; i++) - free(This->global_props[i].name); + SysFreeString(This->global_props[i].name); free(This->global_props); if(This->mon) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index b006202befd..591bb3eddd1 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -656,7 +656,7 @@ typedef enum { typedef struct { global_prop_type_t type; - WCHAR *name; + BSTR name; ScriptHost *script_host; DISPID id; } global_prop_t;