mshtml: Use BSTR to store global prop's name.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
Gabriel Ivăncescu 2024-11-13 19:32:43 +02:00 committed by Alexandre Julliard
parent 85331da430
commit 18aefb5dcf
Notes: Alexandre Julliard 2024-11-14 23:12:21 +01:00
Approved-by: Jacek Caban (@jacek)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6721
2 changed files with 3 additions and 3 deletions

View file

@ -3302,7 +3302,7 @@ static global_prop_t *alloc_global_prop(HTMLInnerWindow *This, global_prop_type_
This->global_prop_size = new_size; 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) if(!This->global_props[This->global_prop_cnt].name)
return NULL; return NULL;
@ -3779,7 +3779,7 @@ static void HTMLWindow_destructor(DispatchEx *dispex)
VariantClear(&This->performance); VariantClear(&This->performance);
for(i = 0; i < This->global_prop_cnt; i++) 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); free(This->global_props);
if(This->mon) if(This->mon)

View file

@ -656,7 +656,7 @@ typedef enum {
typedef struct { typedef struct {
global_prop_type_t type; global_prop_type_t type;
WCHAR *name; BSTR name;
ScriptHost *script_host; ScriptHost *script_host;
DISPID id; DISPID id;
} global_prop_t; } global_prop_t;