ntdll: Only free the string if the test succeeded.
This commit is contained in:
parent
bf58fdd197
commit
af0bb4a141
|
@ -468,7 +468,7 @@ static void test_RtlDuplicateUnicodeString(void)
|
||||||
ok(memcmp(dest_str.Buffer, res_str.Buffer, dupl_ustr[test_num].res_buf_size) == 0,
|
ok(memcmp(dest_str.Buffer, res_str.Buffer, dupl_ustr[test_num].res_buf_size) == 0,
|
||||||
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination \"%s\" expected \"%s\"\n",
|
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination \"%s\" expected \"%s\"\n",
|
||||||
test_num, dupl_ustr[test_num].add_nul, dest_ansi_str.Buffer, dupl_ustr[test_num].res_buf);
|
test_num, dupl_ustr[test_num].add_nul, dest_ansi_str.Buffer, dupl_ustr[test_num].res_buf);
|
||||||
pRtlFreeUnicodeString(&dest_str);
|
if(result == STATUS_SUCCESS) pRtlFreeUnicodeString(&dest_str);
|
||||||
} else {
|
} else {
|
||||||
ok(dest_str.Buffer == NULL && dupl_ustr[test_num].res_buf == NULL,
|
ok(dest_str.Buffer == NULL && dupl_ustr[test_num].res_buf == NULL,
|
||||||
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination %p expected %p\n",
|
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination %p expected %p\n",
|
||||||
|
|
Loading…
Reference in New Issue