mshtml/tests: Fix SysFreeString call with wrong variable.
Jacek Caban
jacek at codeweavers.com
Sun Mar 1 06:49:57 CST 2009
Rico Schüller wrote:
> Hi,
>
> I'd like to have some feedback, before I send this to wine-patches.
>
> This patch removes a regression in the mshtml test, where the wrong
> variable is called by SysFreeString, which leads sometimes to a crash
> (
> http://test.winehq.org/data/0d7bec3578e02e1f551813e86100b59e36aec542/#group_Wine:mshtml:dom
> ).
>
> Is this fix correct?
Yes, it is.
>
> A second problem is there a need to call SysFreeString() after each
> IHTMLStyle_get* when a variable isn't used any more because it does a
> Sys*AllocString* call (in get_nsstyle_attr)? Or is this call useless
> and automatically done when the app is terminated?
It is not useless, although the memory is freed after app terminated, we
should free it as soon as it's no longer needed.
Thanks,
Jacek
More information about the wine-devel
mailing list