ldap/servers/slapd/libglobs.c | 1 + 1 file changed, 1 insertion(+)
New commits: commit e754339c441ea30b5c555171e6723ea74375d523 Author: Noriko Hosoi nhosoi@totoro.usersys.redhat.com Date: Wed Nov 14 13:41:30 2012 -0800
Coverity defect: Resource leak 13110
This commit 94b123780b21e503b78bceca9d60904206ef91fa introduced the resource leak. Trac Ticket #447 - Possible to add invalid attribute to nsslapd-allowed-to-delete-attrs
Fix description: This patch calls slapi_ch_array_free for the allocated charray "allowed".
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c index a7e504f..b19c2d9 100644 --- a/ldap/servers/slapd/libglobs.c +++ b/ldap/servers/slapd/libglobs.c @@ -6508,6 +6508,7 @@ config_set_allowed_to_delete_attrs( const char *attrname, char *value, slapi_ch_free_string(&vcopy); vcopy = slapi_ch_strdup(value); } + slapi_ch_array_free(allowed); CFG_LOCK_WRITE(slapdFrontendConfig); slapi_ch_free_string(&(slapdFrontendConfig->allowed_to_delete_attrs)); slapdFrontendConfig->allowed_to_delete_attrs = vcopy;