diff options
author | Rich Megginson <rmeggins@redhat.com> | 2008-08-11 17:02:00 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2008-08-11 17:02:00 +0000 |
commit | f38168d04718776fac0c0ab09f095837d24d4503 (patch) | |
tree | 7ee063e19a0699247d767990097024cef73547c9 | |
parent | 6a2f78600bda933713c5bebe6954ed8c39fddc48 (diff) | |
download | ds-f38168d04718776fac0c0ab09f095837d24d4503.tar.gz ds-f38168d04718776fac0c0ab09f095837d24d4503.tar.xz ds-f38168d04718776fac0c0ab09f095837d24d4503.zip |
Resolves: bug 457156
Bug Description: GER: allow GER for non-existing entries (phase 2)
Reviewed by: nhosoi (Thanks!)
Fix Description: There are a couple of memory leaks in the code. acleffectiverights.c line 617 calls slapi_attr_get_valueset to get the list of objectclass values in objclassvals - this function allocates memory (returns a dup of the list) but this is not freed. The fix is to call slapi_valueset_free() to free it. The allattrs and opattrs arrays are not freed in all conditions. The fix is to make sure they are freed in all conditions.
Platforms tested: RHEL5, Fedora 8
Flag Day: no
Doc impact: no
-rw-r--r-- | ldap/servers/plugins/acl/acleffectiverights.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ldap/servers/plugins/acl/acleffectiverights.c b/ldap/servers/plugins/acl/acleffectiverights.c index 6c73862c..70c7c858 100644 --- a/ldap/servers/plugins/acl/acleffectiverights.c +++ b/ldap/servers/plugins/acl/acleffectiverights.c @@ -649,6 +649,7 @@ _ger_get_attrs_rights ( } } } + slapi_valueset_free(objclassvals); } /* get operational attrs */ @@ -706,9 +707,9 @@ _ger_get_attrs_rights ( } } } - charray_free(allattrs); - charray_free(opattrs); } + charray_free(allattrs); + charray_free(opattrs); } else { |