summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-07-29 17:55:19 -0500
committerNoriko Hosoi <nhosoi@redhat.com>2010-08-19 14:24:48 -0700
commitb969287dda45bbd511a85cb2227e2ad2779e82b5 (patch)
treefe63ae110751f7b561e5892ec4c7d980e70bf78b
parente49b10c286ecde1d31a094a82bb223a120ae656c (diff)
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 12008. description: The dna_is_replica_bind_dn() has been modified to release resources before it returns.
-rw-r--r--ldap/servers/plugins/dna/dna.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index 6fc222a5..5838cd74 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -2322,7 +2322,8 @@ static int dna_is_replica_bind_dn(char *range_dn, char *bind_dn)
slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM,
"dna_is_replica_bind_dn: failed to create "
"replica dn for %s\n", be_suffix);
- return 1;
+ ret = 1;
+ goto done;
}
replica_sdn = slapi_sdn_new_dn_passin(replica_dn);
@@ -2350,6 +2351,7 @@ static int dna_is_replica_bind_dn(char *range_dn, char *bind_dn)
}
}
+done:
slapi_entry_free(e);
slapi_sdn_free(&range_sdn);
slapi_sdn_free(&replica_sdn);