mirror of
https://github.com/reactos/wine.git
synced 2024-12-03 09:20:56 +00:00
shlwapi/tests: Remove redundant NULL check before SysFreeString (Smatch).
This commit is contained in:
parent
f830a12ddb
commit
b562a512eb
@ -664,16 +664,14 @@ static void test_StrRetToBSTR(void)
|
||||
ret = pStrRetToBSTR(&strret, NULL, &bstr);
|
||||
ok(ret == S_OK && bstr && !strcmpW(bstr, szTestW),
|
||||
"STRRET_WSTR: dup failed, ret=0x%08x, bstr %p\n", ret, bstr);
|
||||
if (bstr)
|
||||
SysFreeString(bstr);
|
||||
SysFreeString(bstr);
|
||||
|
||||
strret.uType = STRRET_CSTR;
|
||||
lstrcpyA(U(strret).cStr, "Test");
|
||||
ret = pStrRetToBSTR(&strret, NULL, &bstr);
|
||||
ok(ret == S_OK && bstr && !strcmpW(bstr, szTestW),
|
||||
"STRRET_CSTR: dup failed, ret=0x%08x, bstr %p\n", ret, bstr);
|
||||
if (bstr)
|
||||
SysFreeString(bstr);
|
||||
SysFreeString(bstr);
|
||||
|
||||
strret.uType = STRRET_OFFSET;
|
||||
U(strret).uOffset = 1;
|
||||
@ -681,8 +679,7 @@ static void test_StrRetToBSTR(void)
|
||||
ret = pStrRetToBSTR(&strret, iidl, &bstr);
|
||||
ok(ret == S_OK && bstr && !strcmpW(bstr, szTestW),
|
||||
"STRRET_OFFSET: dup failed, ret=0x%08x, bstr %p\n", ret, bstr);
|
||||
if (bstr)
|
||||
SysFreeString(bstr);
|
||||
SysFreeString(bstr);
|
||||
|
||||
/* Native crashes if str is NULL */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user