|
|
0a5078 |
From 877df07df2e41988a797778b132935b7d8acfd87 Mon Sep 17 00:00:00 2001
|
|
|
0a5078 |
From: Mark Reynolds <mreynolds@redhat.com>
|
|
|
0a5078 |
Date: Fri, 5 Aug 2022 14:07:18 -0400
|
|
|
0a5078 |
Subject: [PATCH 4/5] Issue 5397 - Fix various memory leaks
|
|
|
0a5078 |
|
|
|
0a5078 |
Description:
|
|
|
0a5078 |
|
|
|
0a5078 |
Fixed memory leaks in:
|
|
|
0a5078 |
|
|
|
0a5078 |
- Filter optimizer introduced sr_norm_filter_intent which dupped a filter
|
|
|
0a5078 |
but never freed it.
|
|
|
0a5078 |
- Replication connections would leak the replication manager's
|
|
|
0a5078 |
credentials.
|
|
|
0a5078 |
|
|
|
0a5078 |
relates: https://github.com/389ds/389-ds-base/issues/5397
|
|
|
0a5078 |
|
|
|
0a5078 |
Reviewed by: progier & jchapman (Thanks!!)
|
|
|
0a5078 |
---
|
|
|
0a5078 |
ldap/servers/plugins/replication/repl5_connection.c | 1 +
|
|
|
0a5078 |
ldap/servers/slapd/back-ldbm/ldbm_search.c | 1 +
|
|
|
0a5078 |
2 files changed, 2 insertions(+)
|
|
|
0a5078 |
|
|
|
0a5078 |
diff --git a/ldap/servers/plugins/replication/repl5_connection.c b/ldap/servers/plugins/replication/repl5_connection.c
|
|
|
0a5078 |
index b6bc21c46..be8bba08e 100644
|
|
|
0a5078 |
--- a/ldap/servers/plugins/replication/repl5_connection.c
|
|
|
0a5078 |
+++ b/ldap/servers/plugins/replication/repl5_connection.c
|
|
|
0a5078 |
@@ -247,6 +247,7 @@ conn_delete_internal(Repl_Connection *conn)
|
|
|
0a5078 |
slapi_ch_free_string(&conn->last_ldap_errmsg);
|
|
|
0a5078 |
slapi_ch_free((void **)&conn->hostname);
|
|
|
0a5078 |
slapi_ch_free((void **)&conn->binddn);
|
|
|
0a5078 |
+ slapi_ch_free((void **)&conn->creds);
|
|
|
0a5078 |
slapi_ch_free((void **)&conn->plain);
|
|
|
0a5078 |
}
|
|
|
0a5078 |
|
|
|
0a5078 |
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c b/ldap/servers/slapd/back-ldbm/ldbm_search.c
|
|
|
0a5078 |
index d0f52b6f7..771c35a33 100644
|
|
|
0a5078 |
--- a/ldap/servers/slapd/back-ldbm/ldbm_search.c
|
|
|
0a5078 |
+++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c
|
|
|
0a5078 |
@@ -1930,6 +1930,7 @@ delete_search_result_set(Slapi_PBlock *pb, back_search_result_set **sr)
|
|
|
0a5078 |
rc, filt_errs);
|
|
|
0a5078 |
}
|
|
|
0a5078 |
slapi_filter_free((*sr)->sr_norm_filter, 1);
|
|
|
0a5078 |
+ slapi_filter_free((*sr)->sr_norm_filter_intent, 1);
|
|
|
0a5078 |
memset(*sr, 0, sizeof(back_search_result_set));
|
|
|
0a5078 |
slapi_ch_free((void **)sr);
|
|
|
0a5078 |
return;
|
|
|
0a5078 |
--
|
|
|
0a5078 |
2.37.1
|
|
|
0a5078 |
|