#48135 memory leak in new_passwdPolicy (1.2.11 only)
Closed: wontfix Opened 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

Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1202501

Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1202502

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 fd44ab1697fa58c5f078063770fadc37657386a5

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 fd44ab1697fa58c5f078063770fadc37657386a5

Reverting this commit.
commit d19a1910446bc90ee474f6419ef8e229c27f8a5f
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 d19a1910446bc90ee474f6419ef8e229c27f8a5f
commit aa76f6b79db14c03c74b7c064f33a37bba991bf5

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

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1466

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

Metadata