Commit af0bb4a1 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

ntdll: Only free the string if the test succeeded.

parent bf58fdd1
...@@ -468,7 +468,7 @@ static void test_RtlDuplicateUnicodeString(void) ...@@ -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",
......
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