Commit c7bbf365 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

ntdll: Handle error cases in om test (Coverity).

parent 93f92d51
......@@ -419,9 +419,12 @@ static void test_directory(void)
memset( buffer, 0xaa, sizeof(buffer) );
status = pNtQuerySymbolicLinkObject( dir, &str, &len );
ok( status == STATUS_SUCCESS, "NtQuerySymbolicLinkObject failed %08x\n", status );
if (status != STATUS_SUCCESS)
goto error;
full_len = str.Length + sizeof(WCHAR);
ok( len == full_len, "bad length %u/%u\n", len, full_len );
ok( buffer[len / sizeof(WCHAR) - 1] == 0, "no terminating null\n" );
if (len == full_len)
ok( buffer[len / sizeof(WCHAR) - 1] == 0, "no terminating null\n" );
str.MaximumLength = str.Length;
len = 0xdeadbeef;
......@@ -441,6 +444,7 @@ static void test_directory(void)
ok( status == STATUS_SUCCESS, "NtQuerySymbolicLinkObject failed %08x\n", status );
ok( len == full_len, "bad length %u/%u\n", len, full_len );
error:
pNtClose(dir);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment