Bug 548535
Summary: | memory leak in attrcrypt | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Noriko Hosoi <nhosoi> | ||||||||
Component: | Database - General | Assignee: | Noriko Hosoi <nhosoi> | ||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> | ||||||||
Severity: | low | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | 1.3.0 | CC: | jgalipea, rmeggins | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2015-12-07 17:03:54 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 434914, 543590 | ||||||||||
Attachments: |
|
Description
Noriko Hosoi
2009-12-17 18:04:21 UTC
Created attachment 389229 [details]
git patch file
Files:
ldap/servers/slapd/back-ldbm/dblayer.c
ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
Description:
The attrcrypt module maintains the inst_attrcrypt_state_private
field in the instance structure (ldbm_instance) to store the private
keys. The area and the space for the private keys are allocated in
attrcrypt_init which is called from dblayer_instance_start.
A backend instance could be closed and restarted multiple times
(for instance, in the bulk_import, which is used by the replica
initialization), but the area had no chance to be freed.
This patch is adding the clean-up code.
Comment on attachment 389229 [details]
git patch file
The formatting in attrcrypt_cleanup_private() of the LDAPDebug macros is not correct - looks like you need tabs there.
Otherwise, looks good.
Created attachment 389573 [details] git patch file (revised based upon the comment from Rich) (In reply to comment #3) > (From update of attachment 389229 [details]) > The formatting in attrcrypt_cleanup_private() of the LDAPDebug macros is not > correct - looks like you need tabs there. > > Otherwise, looks good. Rich, thank you for reviewing the patch! Pushed to master. $ git merge work Updating 5c859f5..571f580 Fast forward ldap/servers/slapd/back-ldbm/dblayer.c | 8 ++++++- ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c | 28 +++++++++++++++++++++++- ldap/servers/slapd/back-ldbm/proto-back-ldbm.h | 1 + 3 files changed, 35 insertions(+), 2 deletions(-) $ git push Counting objects: 17, done. Delta compression using 4 threads. Compressing objects: 100% (9/9), done. Writing objects: 100% (9/9), 1.47 KiB, done. Total 9 (delta 7), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 5c859f5..571f580 master -> master Created attachment 419447 [details]
mmraccept valgrind logs
please review the attached valgrind logs for memory leak fix. Thanks! Thanks, Jenny. The particular leak does not exist in the valgrind logs. $ tar xvf ../valgrind_mmraccept.tar accept.vg.12390.12396 accept.vg.12697.12703 accept.vg.12994.13000 [...] accept.vg.7935.7941 accept.vg.8372.8378 accept.vg.8811.8817 $ egrep attrcrypt_acs_list_add * $ verified - RHEL 4 - Thanks Noriko! version: redhat-ds-base-8.2.0-2010060204.el4dsrv |