#48135 memory leak in new_passwdPolicy (1.2.11 only)
Closed: Fixed None Opened 4 years ago by nhosoi.

valgrind output:

==15715== 99,644,620 (65,074,400 direct, 34,570,220 indirect) bytes in 406,715 blocks are definitely lost in loss record 1,985 of 1,987
==15715==    at 0x4A057BB: calloc (vg_replace_malloc.c:593)
==15715==    by 0x3CDB24C4BB: slapi_ch_calloc (ch_malloc.c:243)
==15715==    by 0x3CDB2A0721: new_passwdPolicy (pw.c:1666)
==15715==    by 0x3CDB243595: op_shared_add (add.c:467)
==15715==    by 0x3CDB24505C: do_add (add.c:258)
==15715==    by 0x414543: connection_threadmain (connection.c:579)
==15715==    by 0x3CDC229C92: _pt_root (ptthread.c:212)
==15715==    by 0x3CD9A07A50: start_thread (pthread_create.c:301)
==15715==    by 0x3CD96E892C: clone (clone.S:115)


0270-Ticket-47900-Adding-an-entry-with-an-invalid-passwor.patch:
+    pwpolicy = new_passwdPolicy(pb, slapi_entry_get_dn(e));
commit bcf43fb4346547f92f6d5748942bedf54307cc2e
Ticket 47900 - Adding an entry with an invalid password as rootDN is incorrectly rejected

1.3.0 and newers are already fixed by #147 - Internal Password Policy usage very inefficient
{{{
diff --git a/ldap/servers/slapd/pblock.c b/ldap/servers/slapd/pblock.c
index 9895d49..d7a726d 100644
--- a/ldap/servers/slapd/pblock.c
+++ b/ldap/servers/slapd/pblock.c
@@ -111,10 +111,11 @@ pblock_done( Slapi_PBlock *pb )
{
if(pb->pb_op!=NULL)
{
- operation_free(&pb->pb_op,pb->pb_conn);
+ operation_free(&pb->pb_op,pb->pb_conn);
}
- slapi_ch_free((void)&(pb->pb_vattr_context));
- slapi_ch_free((void
)&(pb->pb_result_text));
+ delete_passwdPolicy(&pb->pwdpolicy);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ slapi_ch_free((void)&(pb->pb_vattr_context));
+ slapi_ch_free((void
)&(pb->pb_result_text));
}}}

Reviewed by Rich (Thank you!!)

Pushed to 389-ds-base-1.2.11:
3579393..fd44ab1 389-ds-base-1.2.11 -> 389-ds-base-1.2.11
commit fd44ab1

Replying to [comment:7 nhosoi]:

Reviewed by Rich (Thank you!!)

Pushed to 389-ds-base-1.2.11:
3579393..fd44ab1 389-ds-base-1.2.11 -> 389-ds-base-1.2.11
commit fd44ab1

Reverting this commit.
commit d19a191
Author: Noriko Hosoi nhosoi@redhat.com
Date: Thu Mar 19 14:37:03 2015 -0700

Revert "Ticket #48135 - memory leak in new_passwdPolicy (1.2.11 only)"

This reverts commit fd44ab1697fa58c5f078063770fadc37657386a5.

Reivewed by Rich (Thank you!!)

Pushed to 389-ds-base-1.2.11:
commit d19a191
commit aa76f6b

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.2.11.33

2 years ago

Login to comment on this ticket.

Metadata