Huw Davies : oleaut32: Fix a couple of memory leaks in the tests.

Alexandre Julliard julliard at winehq.org
Mon Dec 7 10:26:13 CST 2009


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Sun Dec  6 12:05:37 2009 +0000

oleaut32: Fix a couple of memory leaks in the tests.

Found by Valgrind.

---

 dlls/oleaut32/tests/safearray.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c
index d539056..439325d 100644
--- a/dlls/oleaut32/tests/safearray.c
+++ b/dlls/oleaut32/tests/safearray.c
@@ -1658,9 +1658,11 @@ static void test_SafeArrayChangeTypeEx(void)
   MKARRAY(0,1,VT_UI1);
   hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_NULL);
   ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %x\n", hres);
+  VariantClear(&v);
   MKARRAY(0,1,VT_UI1);
   hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_EMPTY);
   ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %x\n", hres);
+  VariantClear(&v);
 
 }
 




More information about the wine-cvs mailing list