Bug 183903 - Memory leak in ldbm_config.c:replace_ldbm_config_value
Summary: Memory leak in ldbm_config.c:replace_ldbm_config_value
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Directory Server
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 152373 fds103trackingbug 240316
TreeView+ depends on / blocked
 
Reported: 2006-03-03 15:46 UTC by Rich Megginson
Modified: 2015-12-07 16:35 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-07 16:35:30 UTC
Embargoed:


Attachments (Terms of Use)

Description Rich Megginson 2006-03-03 15:46:59 UTC
I'm pretty sure this function needs to call slapi_mods_done(&smods) after the
internal modify operation.

Comment 1 Rich Megginson 2006-10-12 20:58:00 UTC
*** ldbm_config.c.~1.6.~	2006-04-11 09:48:11.000000000 -0600
--- ldbm_config.c	2006-10-12 15:00:22.000000000 -0600
***************
*** 1760,1764 ****
--- 1760,1765 ----
          		   slapi_mods_get_ldapmods_byref(&smods),
          		   NULL, NULL, li->li_identity, 0);
      slapi_modify_internal_pb(&pb);
+     slapi_mods_done(&smods);
      pblock_done(&pb);
  }


Comment 2 Noriko Hosoi 2006-10-12 21:17:55 UTC
Yep, it's a leak...  Good catch!

Comment 3 Rich Megginson 2006-10-12 21:21:41 UTC
Reviewed by: nhosoi (Thanks!)
Files: see diff
Branch: HEAD
Fix Description: Just needed to call slapi_mods_done(&smods) after the call to
slapi_modify_internal_pb().  This is the same as in the other places in the
server that perform an internal modify operation.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no

Checking in ldbm_config.c;
/cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_config.c,v  <-- 
ldbm_config.c
new revision: 1.7; previous revision: 1.6
done


Comment 4 Rich Megginson 2008-01-03 20:54:41 UTC
Memory leak not seen anymore by valgrind.


Note You need to log in before you can comment on or make changes to this bug.