|
|
dc8c34 |
From 9812613da4adcf356ef9689b3eea0f9ce795efa8 Mon Sep 17 00:00:00 2001
|
|
|
dc8c34 |
From: Rich Megginson <rmeggins@redhat.com>
|
|
|
dc8c34 |
Date: Tue, 10 Dec 2013 08:08:35 -0700
|
|
|
dc8c34 |
Subject: [PATCH 114/115] Ticket #47623 fix memleak caused by 47347
|
|
|
dc8c34 |
|
|
|
dc8c34 |
https://fedorahosted.org/389/ticket/47623
|
|
|
dc8c34 |
Reviewed by: tbordaz, nhosoi (Thanks!)
|
|
|
dc8c34 |
Branch: 389-ds-base-1.2.11
|
|
|
dc8c34 |
Fix Description: Create the mutex if it doesn't exist.
|
|
|
dc8c34 |
Platforms tested: RHEL6 x86_64
|
|
|
dc8c34 |
Flag Day: no
|
|
|
dc8c34 |
Doc impact: no
|
|
|
dc8c34 |
(cherry picked from commit 0d4849dd7551347f0e24ac1027f4d0501084dcf3)
|
|
|
dc8c34 |
(cherry picked from commit 5d3ae5f709964cd7dfb73b631a22389223f5ef25)
|
|
|
dc8c34 |
(cherry picked from commit 5c649ddacd1d2c11b6e922b29472094b780c2a0e)
|
|
|
dc8c34 |
(cherry picked from commit 75ed4b36722eeff8dc2d6aad0cf5e32dc474c3a7)
|
|
|
dc8c34 |
(cherry picked from commit 1eb281a8a1c5d6c1a22c198a23a8ba7b65991d77)
|
|
|
dc8c34 |
---
|
|
|
dc8c34 |
ldap/servers/slapd/pagedresults.c | 4 +++-
|
|
|
dc8c34 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
diff --git a/ldap/servers/slapd/pagedresults.c b/ldap/servers/slapd/pagedresults.c
|
|
|
dc8c34 |
index a835d6b..9af5773 100644
|
|
|
dc8c34 |
--- a/ldap/servers/slapd/pagedresults.c
|
|
|
dc8c34 |
+++ b/ldap/servers/slapd/pagedresults.c
|
|
|
dc8c34 |
@@ -122,7 +122,6 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
|
|
|
dc8c34 |
sizeof(PagedResults) * maxlen);
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
*index = maxlen; /* the first position in the new area */
|
|
|
dc8c34 |
- conn->c_pagedresults.prl_list[*index].pr_mutex = PR_NewLock();
|
|
|
dc8c34 |
} else {
|
|
|
dc8c34 |
for (i = 0; i < conn->c_pagedresults.prl_maxlen; i++) {
|
|
|
dc8c34 |
if (!conn->c_pagedresults.prl_list[i].pr_current_be) {
|
|
|
dc8c34 |
@@ -131,6 +130,9 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
+ if (!conn->c_pagedresults.prl_list[*index].pr_mutex) {
|
|
|
dc8c34 |
+ conn->c_pagedresults.prl_list[*index].pr_mutex = PR_NewLock();
|
|
|
dc8c34 |
+ }
|
|
|
dc8c34 |
conn->c_pagedresults.prl_count++;
|
|
|
dc8c34 |
} else {
|
|
|
dc8c34 |
/* Repeated paged results request.
|
|
|
dc8c34 |
--
|
|
|
dc8c34 |
1.8.1.4
|
|
|
dc8c34 |
|