riched20/tests: Fix a SysAllocString leak

Nikolay Sivov bunglehead at gmail.com
Wed Mar 12 10:47:05 CDT 2014


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().



More information about the wine-devel mailing list