ole32: Fix memory leaks in the storage test.

This commit is contained in:
Vincent Povirk 2009-12-17 18:09:22 -06:00 committed by Alexandre Julliard
parent 0fe54088bc
commit 4f0dfb51b3
1 changed files with 5 additions and 0 deletions

View File

@ -877,6 +877,9 @@ static void test_streamenum(void)
ok(r==S_OK, "IEnumSTATSTG->Next failed\n");
ok(count == 1, "count wrong\n");
if (r == S_OK)
CoTaskMemFree(stat.pwcsName);
r = IEnumSTATSTG_Release(ee);
/* second enum... destroy the stream before reading */
@ -1939,6 +1942,7 @@ static void test_fmtusertypestg(void)
found = TRUE;
else
ok(0, "found unexpected stream or storage\n");
CoTaskMemFree(statstg.pwcsName);
}
ok(found == TRUE, "expected storage to contain stream \\0001CompObj\n");
IEnumSTATSTG_Release(stat);
@ -1962,6 +1966,7 @@ static void test_fmtusertypestg(void)
found = TRUE;
else
ok(0, "found unexpected stream or storage\n");
CoTaskMemFree(statstg.pwcsName);
}
ok(found == TRUE, "expected storage to contain stream \\0001CompObj\n");
IEnumSTATSTG_Release(stat);