From fa2c5092434379ef3e0c5ea2b014acea42043925 Mon Sep 17 00:00:00 2001 From: Jactry Zeng Date: Thu, 13 Mar 2014 20:49:18 +0800 Subject: [PATCH] riched20/tests: Fix a SysAllocString leak. --- dlls/riched20/tests/richole.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index 3781e68f342..5bfb9993b0f 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -190,7 +190,7 @@ static void test_ITextDocument_Open(void) int tomNumSingle = sizeof(tomConstantsSingle)/sizeof(tomConstantsSingle[0]); int tomNumMulti = sizeof(tomConstantsMulti)/sizeof(tomConstantsMulti[0]); int i; - VariantInit(&testfile); + V_VT(&testfile) = VT_BSTR; V_BSTR(&testfile) = SysAllocString(filename); @@ -378,6 +378,8 @@ static void test_ITextDocument_Open(void) todo_wine ok(result == 0, "ITextDocument_Open: Test UTF-16 set wrong text: Result: %s\n", wine_dbgstr_w(bufUnicode)); release_interfaces(&w, &reOle, &txtDoc, &txtSel); DeleteFileW(filename); + + VariantClear(&testfile); } START_TEST(richole)