From d59e59d7767f5a7ff415bc576e259ba4d9103ed5 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 17 Dec 2009 18:09:22 -0600 Subject: [PATCH 2/2] ole32: Fix memory leaks in the storage test. --- dlls/ole32/tests/storage32.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index f89a787..12f2504 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -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); -- 1.6.3.3