浏览代码

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".
Noriko Hosoi 13 年之前
父节点
当前提交
e754339c44
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      ldap/servers/slapd/libglobs.c

+ 1 - 0
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;