andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
dc8c34
From 7993502b5e00c7f2d05d1b0c3feb573cf62e1a49 Mon Sep 17 00:00:00 2001
dc8c34
From: Rich Megginson <rmeggins@redhat.com>
dc8c34
Date: Mon, 9 Dec 2013 17:00:32 -0700
dc8c34
Subject: [PATCH 113/115] Ticket #47623 fix memleak caused by 47347
dc8c34
dc8c34
https://fedorahosted.org/389/ticket/47623
dc8c34
Reviewed by: nhosoi (Thanks!)
dc8c34
Branch: 389-ds-base-1.2.11
dc8c34
Fix Description: Only need to create the mutex when creating a new PR object.
dc8c34
Platforms tested: RHEL6 x86_64
dc8c34
Flag Day: no
dc8c34
Doc impact: no
dc8c34
(cherry picked from commit 98ccb602058270e97a3702ae2b81c17635af8d27)
dc8c34
(cherry picked from commit 65c51555c0ecc94c5d93f09124168697ba1db6b3)
dc8c34
(cherry picked from commit 8a2c666df491b7c8666f8a70a5038b35c43fbc3b)
dc8c34
(cherry picked from commit 8968e078caacf1021a11c19546c448a4b65db098)
dc8c34
(cherry picked from commit 1ad3604b8bfbd5c2a3c4ca8f55b8690a2098f3df)
dc8c34
---
dc8c34
 ldap/servers/slapd/pagedresults.c | 2 +-
dc8c34
 1 file changed, 1 insertion(+), 1 deletion(-)
dc8c34
dc8c34
diff --git a/ldap/servers/slapd/pagedresults.c b/ldap/servers/slapd/pagedresults.c
dc8c34
index 78bd6b0..a835d6b 100644
dc8c34
--- a/ldap/servers/slapd/pagedresults.c
dc8c34
+++ b/ldap/servers/slapd/pagedresults.c
dc8c34
@@ -122,6 +122,7 @@ 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,7 +132,6 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
dc8c34
             }
dc8c34
         }
dc8c34
         conn->c_pagedresults.prl_count++;
dc8c34
-        conn->c_pagedresults.prl_list[*index].pr_mutex = PR_NewLock();
dc8c34
     } else {
dc8c34
         /* Repeated paged results request.
dc8c34
          * PagedResults is already allocated. */
dc8c34
-- 
dc8c34
1.8.1.4
dc8c34