shlwapi/tests: Avoid memory leaks (coverity)
Frédéric Delanoy
frederic.delanoy at gmail.com
Wed Nov 27 07:34:52 CST 2013
CID 713714-713719
---
dlls/shlwapi/tests/ordinal.c | 3 +++
dlls/shlwapi/tests/url.c | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/shlwapi/tests/ordinal.c b/dlls/shlwapi/tests/ordinal.c
index 2f7de63..c344ba2 100644
--- a/dlls/shlwapi/tests/ordinal.c
+++ b/dlls/shlwapi/tests/ordinal.c
@@ -2283,6 +2283,7 @@ static void test_IUnknown_QueryServiceExec(void)
if (is_win2k_and_lower)
{
win_skip("IUnknown_QueryServiceExec is not available\n");
+ IServiceProvider_Release(provider);
return;
}
@@ -2396,6 +2397,8 @@ static void test_IUnknown_ProfferService(void)
if (is_win2k_and_lower)
{
win_skip("IUnknown_ProfferService is not available\n");
+ IServiceProvider_Release(provider);
+ IProfferService_Release(proff);
return;
}
diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c
index 7c1fdb5..6200f83 100644
--- a/dlls/shlwapi/tests/url.c
+++ b/dlls/shlwapi/tests/url.c
@@ -1092,7 +1092,7 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla
if (!pUrlCombineA) {
win_skip("UrlCombineA not found\n");
- return;
+ goto cleanup;
}
hr = pUrlCombineA(szUrl1, szUrl2, NULL, NULL, dwFlags);
@@ -1136,6 +1136,7 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla
}
}
+cleanup:
FreeWideString(wszUrl1);
FreeWideString(wszUrl2);
FreeWideString(wszExpectUrl);
--
1.8.4.4
More information about the wine-patches
mailing list