Avoid accessing an uninitialized string in the failure case.

This commit is contained in:
Alexandre Julliard 2005-03-14 17:20:58 +00:00
parent c5de0253cd
commit 3fe9aa2054

View File

@ -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" );
ok( !strcmp( str, refs[i].refStr ),
"incorrect sid, expected %s, got %s\n", refs[i].refStr, str );
if( str )
if (r)
{
ok( !strcmp( str, refs[i].refStr ),
"incorrect sid, expected %s, got %s\n", refs[i].refStr, str );
LocalFree( str );
}
if( psid )
FreeSid( psid );