Sven Baars : opcservices/tests: Fix some memory leaks (Valgrind).

Alexandre Julliard julliard at winehq.org
Wed Jan 16 16:25:00 CST 2019


Module: wine
Branch: master
Commit: 0b3e7115de6749262296518d659247168a202f5f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0b3e7115de6749262296518d659247168a202f5f

Author: Sven Baars <sven.wine at gmail.com>
Date:   Wed Jan 16 20:13:02 2019 +0100

opcservices/tests: Fix some memory leaks (Valgrind).

Signed-off-by: Sven Baars <sven.wine at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/opcservices/tests/opcservices.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/opcservices/tests/opcservices.c b/dlls/opcservices/tests/opcservices.c
index 9792302..cd683b0 100644
--- a/dlls/opcservices/tests/opcservices.c
+++ b/dlls/opcservices/tests/opcservices.c
@@ -356,7 +356,10 @@ static void test_relationship(void)
     hr = IOpcFactory_CreatePackage(factory, &package);
     ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) /* Vista */, "Failed to create a package, hr %#x.\n", hr);
     if (FAILED(hr))
+    {
+        IOpcFactory_Release(factory);
         return;
+    }
 
     hr = CreateUri(targetW, Uri_CREATE_ALLOW_RELATIVE, 0, &target_uri);
     ok(SUCCEEDED(hr), "Failed to create target uri, hr %#x.\n", hr);
@@ -1201,6 +1204,7 @@ static void test_create_part_uri(void)
         ok(!!ret, "%u: unexpected result %d.\n", i, ret);
 
         IOpcPartUri_Release(part_uri);
+        IUri_Release(uri);
 
         heap_free(inputW);
         heap_free(rawW);




More information about the wine-cvs mailing list