[PATCH 1/3] scrobj/tests: Don't set site to NULL before it has been freed (Valgrind).

Jacek Caban jacek at codeweavers.com
Mon Oct 21 06:19:49 CDT 2019


On 21/10/2019 07:16, Sven Baars wrote:
> On 21-10-19 12:17, Jacek Caban wrote:
>> Hi Sven,
>>
>>
>> On 19/10/2019 15:20, Sven Baars wrote:
>>> @@ -750,6 +749,7 @@ static void register_script_object(BOOL
>>> do_register, const WCHAR *file_name)
>>>        HRESULT hres;
>>>          parse_flags = SCRIPTTEXT_ISPERSISTENT | SCRIPTTEXT_ISVISIBLE;
>>> +    site = NULL;
>>
>> Do we need to set it here? It seems to me that Close() should already
>> take care of that.
>>
>>
>> Thanks,
>>
>> Jacek
>>
> Hi Jacek,
>
> I did that to initialize it to NULL before it gets used in the other
> methods. Else it would be uninitialized.


It's a static variable, so it will be initialized to NULL.


Jacek




More information about the wine-devel mailing list