Re: [PATCH] msxml3: avoid double free of str (Coverity)
On 1/1/2014 22:15, Marcus Meissner wrote:
1127305 Double free --- dlls/msxml3/tests/domdoc.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index df11197..f653a8b 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -11047,7 +11047,6 @@ static void test_xmlns_attribute(void) ok( hr == S_OK, "got 0x%08x\n", hr); todo_wine ok( lstrcmpW(str, _bstr_("<Testing xmlns:dt=\"urn:schemas-microsoft-com:datatypes\" dt:dt=\"bin.base64\"/>")) == 0, "got %s\n", wine_dbgstr_w(str)); - SysFreeString(str); This is a correct fix technically, but it's better to remove second SysFreeString(), not this one. Speaking of style, I'd probably remove all 'if (hr == S_OK)' check, it never fails, or reduced a scope of 'str'.
participants (1)
-
Nikolay Sivov