windowscodecs: Fix leak in test_propertybag_getpropertyinfo.

Vincent Povirk madewokherd at gmail.com
Wed Jun 18 15:03:22 CDT 2014


For bug 36596.
-------------- next part --------------
From b80bd5f50817c40ff7087ff36c50abca4a9c51a7 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Thu, 12 Jun 2014 15:48:36 -0500
Subject: [PATCH] windowscodecs: Fix leak in test_propertybag_getpropertyinfo.

---
 dlls/windowscodecs/tests/propertybag.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/windowscodecs/tests/propertybag.c b/dlls/windowscodecs/tests/propertybag.c
index b3cf191..55f5f65 100644
--- a/dlls/windowscodecs/tests/propertybag.c
+++ b/dlls/windowscodecs/tests/propertybag.c
@@ -67,10 +67,12 @@ static void test_propertybag_getpropertyinfo(IPropertyBag2 *property, ULONG expe
     ok(pb[0].vt == VT_UI1, "Invalid variant type, pb[0].vt=%x\n", pb[0].vt);
     ok(pb[0].dwType == PROPBAG2_TYPE_DATA, "Invalid variant type, pb[0].dwType=%x\n", pb[0].dwType);
     ok(lstrcmpW(pb[0].pstrName, wszTestProperty1) == 0, "Invalid property name, pb[0].pstrName=%s\n", wine_dbgstr_w(pb[0].pstrName));
+    CoTaskMemFree(pb[0].pstrName);
 
     ok(pb[1].vt == VT_R4, "Invalid variant type, pb[1].vt=%x\n", pb[1].vt);
     ok(pb[1].dwType == PROPBAG2_TYPE_DATA, "Invalid variant type, pb[1].dwType=%x\n", pb[1].dwType);
     ok(lstrcmpW(pb[1].pstrName, wszTestProperty2) == 0, "Invalid property name, pb[1].pstrName=%s\n", wine_dbgstr_w(pb[1].pstrName));
+    CoTaskMemFree(pb[1].pstrName);
 }
 
 static void test_propertybag_countproperties(IPropertyBag2 *property, ULONG expected_count)
-- 
1.8.3.2



More information about the wine-patches mailing list