summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-07-18 17:15:01 -0500
committerNoriko Hosoi <nhosoi@redhat.com>2010-08-20 13:02:57 -0700
commit0ac7d9594143da371c312e5db68967091438d3e2 (patch)
treefa7e0b9b4f826e940054f7f75c1fc3f49f4915cf /ldap/servers/slapd
parent10d403542c5f58f9aefdaab3765eca9085ba4078 (diff)
downloadds-0ac7d9594143da371c312e5db68967091438d3e2.tar.gz
ds-0ac7d9594143da371c312e5db68967091438d3e2.tar.xz
ds-0ac7d9594143da371c312e5db68967091438d3e2.zip
Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136
https://bugzilla.redhat.com/show_bug.cgi?id=616500 Resolves: bug 616500 Bug description: fix coverify Defect Type: Resource leaks issues CID 12095, 12096, 12097. description: Fixed resource leaks in vlv_AddSearchEntry(), vlv_init_index_entry(), and vlv_init_search_entry().
Diffstat (limited to 'ldap/servers/slapd')
-rw-r--r--ldap/servers/slapd/back-ldbm/vlv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ldap/servers/slapd/back-ldbm/vlv.c b/ldap/servers/slapd/back-ldbm/vlv.c
index 053a695e..84a42b8b 100644
--- a/ldap/servers/slapd/back-ldbm/vlv.c
+++ b/ldap/servers/slapd/back-ldbm/vlv.c
@@ -77,6 +77,7 @@ int vlv_AddSearchEntry(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry*
backend *be = inst->inst_be;
if (NULL == be) { /* backend is not associated */
+ vlvSearch_delete(&newVlvSearch);
return SLAPI_DSE_CALLBACK_ERROR;
}
vlvSearch_init(newVlvSearch, pb, entryBefore, inst);
@@ -264,6 +265,7 @@ vlv_init_index_entry(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* en
if (pSearch == NULL) {
LDAPDebug( LDAP_DEBUG_ANY, "Parent doesn't exist for entry %s.\n",
escape_string(slapi_entry_get_dn(entryBefore), ebuf), 0, 0);
+ vlvIndex_delete(&newVlvIndex);
}
else {
vlvIndex_init(newVlvIndex, be, pSearch, entryBefore);
@@ -284,6 +286,7 @@ vlv_init_search_entry(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* e
backend *be= inst->inst_be;
if (NULL == be) { /* backend is not associated */
+ vlvSearch_delete(&newVlvSearch);
return SLAPI_DSE_CALLBACK_ERROR;
}
vlvSearch_init(newVlvSearch, pb, entryBefore, inst);