mirror of
https://github.com/reactos/wine.git
synced 2025-02-18 03:48:01 +00:00
msxml3: Fix double-free of BSTR in domdoc tests.
Using the _bstr_ allocator adds the returned string to a cache, so the string shouldn't be freed with SysFreeString. Therefore, just replace the lone call to _bstr_ in this function by a straight call to SysAllocString.
This commit is contained in:
parent
b84201dca5
commit
211e4fc0fe
@ -209,6 +209,9 @@ static const CHAR szBasicTransformOutput[] =
|
||||
static const WCHAR szNonExistentFile[] = {
|
||||
'c', ':', '\\', 'N', 'o', 'n', 'e', 'x', 'i', 's', 't', 'e', 'n', 't', '.', 'x', 'm', 'l', 0
|
||||
};
|
||||
static const WCHAR szNonExistentAttribute[] = {
|
||||
'n','o','n','E','x','i','s','i','t','i','n','g','A','t','t','r','i','b','u','t','e',0
|
||||
};
|
||||
static const WCHAR szDocument[] = {
|
||||
'#', 'd', 'o', 'c', 'u', 'm', 'e', 'n', 't', 0
|
||||
};
|
||||
@ -1110,7 +1113,7 @@ static void test_domnode( void )
|
||||
SysFreeString( str );
|
||||
|
||||
attr = (IXMLDOMAttribute*)0xdeadbeef;
|
||||
str = _bstr_("nonExisitingAttribute");
|
||||
str = SysAllocString( szNonExistentAttribute );
|
||||
r = IXMLDOMElement_getAttributeNode( element, str, &attr);
|
||||
ok( r == S_FALSE, "getAttributeNode ret %08x\n", r );
|
||||
ok( attr == NULL, "getAttributeNode ret %p, expected NULL\n", attr );
|
||||
|
Loading…
x
Reference in New Issue
Block a user