[PATCH 0/3] MR7694: adslap: Fix some memory leaks.
From: Sven Baars <sbaars(a)codeweavers.com> --- dlls/adsldp/adsldp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 9cc5c6cdc2b..3731cce9efe 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -1366,6 +1366,8 @@ static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filte if (err != LDAP_SUCCESS) { TRACE("ldap_search_sW error %#lx\n", err); + if (ldap_ctx->res) + ldap_msgfree(ldap_ctx->res); if (ldap_ctx->page) ldap_search_abandon_page(ldap->ld, ldap_ctx->page); free(ldap_ctx); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7694
From: Sven Baars <sbaars(a)codeweavers.com> --- dlls/adsldp/adsldp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 3731cce9efe..dd459f3aa18 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -1459,6 +1459,7 @@ exit: return S_ADS_NOMORE_ROWS; ldap_ctx->pos++; + if (ldap_ctx->ber) ber_free(ldap_ctx->ber, 0); ldap_ctx->ber = NULL; return S_OK; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7694
From: Sven Baars <sbaars(a)codeweavers.com> --- dlls/adsldp/tests/ldap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/adsldp/tests/ldap.c b/dlls/adsldp/tests/ldap.c index 7404b62a231..8373f0d82a5 100644 --- a/dlls/adsldp/tests/ldap.c +++ b/dlls/adsldp/tests/ldap.c @@ -449,6 +449,7 @@ static void test_DirectorySearch(void) hr = IDirectorySearch_FreeColumn(ds, &col); ok(hr == S_OK, "got %#lx\n", hr); + FreeADsMem(name); } name = (void *)0xdeadbeef; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7694
participants (2)
-
Sven Baars -
Sven Baars (@sbaars)