1
0
Эх сурвалжийг харах

Ticket #47623 fix memleak caused by 47347

https://fedorahosted.org/389/ticket/47623
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Only need to create the mutex when creating a new PR object.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
Rich Megginson 12 жил өмнө
parent
commit
98ccb60205

+ 1 - 1
ldap/servers/slapd/pagedresults.c

@@ -122,6 +122,7 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
                            sizeof(PagedResults) * maxlen);
             }
             *index = maxlen; /* the first position in the new area */
+            conn->c_pagedresults.prl_list[*index].pr_mutex = PR_NewLock();
         } else {
             for (i = 0; i < conn->c_pagedresults.prl_maxlen; i++) {
                 if (!conn->c_pagedresults.prl_list[i].pr_current_be) {
@@ -131,7 +132,6 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
             }
         }
         conn->c_pagedresults.prl_count++;
-        conn->c_pagedresults.prl_list[*index].pr_mutex = PR_NewLock();
     } else {
         /* Repeated paged results request.
          * PagedResults is already allocated. */