Blame SOURCES/0064-Ticket-47592-automember-plugin-task-memory-leaks.patch

cc3dff
From 2429e72646b1bb30f8566b59dd370eb2ff1ac131 Mon Sep 17 00:00:00 2001
cc3dff
From: Mark Reynolds <mreynolds@redhat.com>
cc3dff
Date: Wed, 27 Nov 2013 10:58:43 -0500
cc3dff
Subject: [PATCH 64/65] Ticket 47592 - automember plugin task memory leaks
cc3dff
cc3dff
The search pblock was not destroyed at the end of the export and rebuild
cc3dff
tasks.
cc3dff
cc3dff
https://fedorahosted.org/389/ticket/47592
cc3dff
cc3dff
Reviewed by: richm(Thanks!)
cc3dff
(cherry picked from commit 085c6d494f90231f2e572a668ab601c321bffb01)
cc3dff
(cherry picked from commit c9c7d545a987f8f52c9752ba1181d1885b74480c)
cc3dff
---
cc3dff
 ldap/servers/plugins/automember/automember.c | 7 +++++--
cc3dff
 1 file changed, 5 insertions(+), 2 deletions(-)
cc3dff
cc3dff
diff --git a/ldap/servers/plugins/automember/automember.c b/ldap/servers/plugins/automember/automember.c
cc3dff
index 3214ea1..cfea69d 100644
cc3dff
--- a/ldap/servers/plugins/automember/automember.c
cc3dff
+++ b/ldap/servers/plugins/automember/automember.c
cc3dff
@@ -2256,7 +2256,6 @@ void automember_rebuild_task_thread(void *arg){
cc3dff
         }
cc3dff
     }
cc3dff
     automember_config_unlock();
cc3dff
-    slapi_free_search_results_internal(search_pb);
cc3dff
 
cc3dff
 out:
cc3dff
     if (plugin_is_betxn && fixup_pb) {
cc3dff
@@ -2267,6 +2266,8 @@ out:
cc3dff
         }
cc3dff
         slapi_pblock_destroy(fixup_pb);
cc3dff
     }
cc3dff
+    slapi_free_search_results_internal(search_pb);
cc3dff
+    slapi_pblock_destroy(search_pb);
cc3dff
 
cc3dff
     if(result){
cc3dff
         /* error */
cc3dff
@@ -2470,9 +2471,11 @@ void automember_export_task_thread(void *arg){
cc3dff
         }
cc3dff
     }
cc3dff
     automember_config_unlock();
cc3dff
-    slapi_free_search_results_internal(search_pb);
cc3dff
 
cc3dff
 out:
cc3dff
+    slapi_free_search_results_internal(search_pb);
cc3dff
+    slapi_pblock_destroy(search_pb);
cc3dff
+
cc3dff
     if(ldif_fd){
cc3dff
         PR_Close(ldif_fd);
cc3dff
     }
cc3dff
-- 
cc3dff
1.8.1.4
cc3dff