Vincent Povirk : ole32: Fix memory leaks in the storage test.

Alexandre Julliard julliard at winehq.org
Fri Dec 18 10:49:08 CST 2009


Module: wine
Branch: master
Commit: 4f0dfb51b371143b2a0dba3a193ab5b7d9abce34
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4f0dfb51b371143b2a0dba3a193ab5b7d9abce34

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Thu Dec 17 18:09:22 2009 -0600

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);




More information about the wine-cvs mailing list