Avoid accessing an uninitialized string in the failure case.
This commit is contained in:
parent
c5de0253cd
commit
3fe9aa2054
|
@ -109,10 +109,12 @@ void test_sid()
|
|||
ok( r, "failed to allocate sid\n" );
|
||||
r = pConvertSidToStringSidA( psid, &str );
|
||||
ok( r, "failed to convert sid\n" );
|
||||
if (r)
|
||||
{
|
||||
ok( !strcmp( str, refs[i].refStr ),
|
||||
"incorrect sid, expected %s, got %s\n", refs[i].refStr, str );
|
||||
if( str )
|
||||
LocalFree( str );
|
||||
}
|
||||
if( psid )
|
||||
FreeSid( psid );
|
||||
|
||||
|
|
Loading…
Reference in New Issue