diff options
author | Endi S. Dewata <edewata@redhat.com> | 2010-07-28 17:23:37 -0500 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2010-08-19 14:22:12 -0700 |
commit | 677e84cd4406bc362f35f78d84e63e12fab97d64 (patch) | |
tree | ad62d6959f5cf1cf123473935b6a0a7bcebd1cbe /ldap | |
parent | 800aac85273aa44597e44a1935c630486157dc2f (diff) | |
download | ds-677e84cd4406bc362f35f78d84e63e12fab97d64.tar.gz ds-677e84cd4406bc362f35f78d84e63e12fab97d64.tar.xz ds-677e84cd4406bc362f35f78d84e63e12fab97d64.zip |
Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053
https://bugzilla.redhat.com/show_bug.cgi?id=619122
Resolves: bug 619122
Bug description: fix coverify Defect Type: Resource leaks issues CID 11984.
description: The mtn_get_referral_from_entry() has been modified to avoid leaking the referral object.
Diffstat (limited to 'ldap')
-rw-r--r-- | ldap/servers/slapd/mapping_tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ldap/servers/slapd/mapping_tree.c b/ldap/servers/slapd/mapping_tree.c index f24c9189..77a21bf4 100644 --- a/ldap/servers/slapd/mapping_tree.c +++ b/ldap/servers/slapd/mapping_tree.c @@ -475,13 +475,13 @@ mtn_get_referral_from_entry(Slapi_Entry * entry) return NULL; slapi_attr_get_numvalues(attr, &nb); - referral = (char **) slapi_ch_malloc(sizeof(char *) * (nb+1)); hint = slapi_attr_first_value(attr, &val); if (NULL == val) { LDAPDebug(LDAP_DEBUG_ANY, "Warning: The nsslapd-referral attribute has no value for the mapping tree node %s\n", slapi_entry_get_dn(entry), 0, 0); return NULL; } + referral = (char **) slapi_ch_malloc(sizeof(char *) * (nb+1)); nb = 0; while (val) { |