Bug 185780
Summary: | one byte memory leak in modify | ||
---|---|---|---|
Product: | [Retired] 389 | Reporter: | Rich Megginson <rmeggins> |
Component: | Directory Server | Assignee: | Rich Megginson <rmeggins> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 1.0 | ||
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 16:56:53 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: | 152373, 208654, 240316 |
Description
Rich Megginson
2006-03-17 22:13:42 UTC
*** modify.c.~1.12.~ 2006-09-01 14:01:10.000000000 -0600 --- modify.c 2006-10-12 15:04:55.000000000 -0600 *************** *** 202,207 **** --- 202,208 ---- send_ldap_result( pb, LDAP_INVALID_SYNTAX, NULL, ebuf, 0, NULL ); slapi_ch_free((void **)&type); ber_bvecfree(mod->mod_bvalues); + ldap_memfree(mod->mod_type); slapi_ch_free((void **)&mod); goto free_and_return; Looks good. I'm just curious... Why you chose "ldap_memfree", not "slapi_ch_free"? Oops, you're right. I should have used slapi_ch_free_string(). Here is the new diff: *** modify.c.~1.12.~ 2006-09-01 14:01:10.000000000 -0600 --- modify.c 2006-10-12 15:52:07.000000000 -0600 *************** *** 202,207 **** --- 202,208 ---- send_ldap_result( pb, LDAP_INVALID_SYNTAX, NULL, ebuf, 0, NULL ); slapi_ch_free((void **)&type); ber_bvecfree(mod->mod_bvalues); + slapi_ch_free_string(&mod->mod_type); slapi_ch_free((void **)&mod); goto free_and_return; } Oh, okay. Then, "no question" about it. ;) Reviewed by: nhosoi (Thanks!) Files: see diff Branch: HEAD Fix Description: Just call ldap_memfree() with the mod->mod_type. This is safe to call with NULL. Platforms tested: RHEL4 Flag Day: no Doc impact: no Checking in modify.c; /cvs/dirsec/ldapserver/ldap/servers/slapd/modify.c,v <-- modify.c new revision: 1.13; previous revision: 1.12 done Verified that we are indeed freeing the mod type in the current code. Marking as VERIFIED. |