riched20/tests: Fix a SysAllocString leak
Jactry Zeng
jactry92 at gmail.com
Thu Mar 13 09:28:08 CDT 2014
2014-03-12 23:47 GMT+08:00 Nikolay Sivov <bunglehead at gmail.com>:
>
> On 3/12/2014 19:36, Jactry Zeng wrote:
>>
>> I made this leak, sorry.. :(
>> "What goes around comes around" was confirmed! :p
>> VariantInit(&testfile);
>> V_VT(&testfile) = VT_BSTR;
>> V_BSTR(&testfile) = SysAllocString(filename);
>
> No need for VariantInit() here.
>
>> + SysFreeString(V_BSTR(&testfile));
>
> It's cleaner to use VariantClear().
Thank you, Nikolay!
I have sent a new one.
Proverb was confirmed again.. :(
--
Regards,
Jactry Zeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20140313/35da3831/attachment.html>
More information about the wine-devel
mailing list