summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2010-09-17 16:46:03 -0400
committerNathan Kinder <nkinder@redhat.com>2010-09-17 14:40:01 -0700
commita076dbbf8eefee8c84b0c7af12f9d2819db11452 (patch)
tree786f7c251ddb25da57c159cf21ffc4c08b1647b0
parent9433fc73f04520ce7f309fef6bcc4052146d34fe (diff)
downloadds-a076dbbf8eefee8c84b0c7af12f9d2819db11452.tar.gz
ds-a076dbbf8eefee8c84b0c7af12f9d2819db11452.tar.xz
ds-a076dbbf8eefee8c84b0c7af12f9d2819db11452.zip
Bug 630092 - Coverity #11991: Resource leaks issues
https://bugzilla.redhat.com/show_bug.cgi?id=630092 Description: The acllas__client_match_URL() has been modified to release the hostport before it returns.
-rw-r--r--ldap/servers/plugins/acl/acllas.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ldap/servers/plugins/acl/acllas.c b/ldap/servers/plugins/acl/acllas.c
index 6271fb1e..99b0281b 100644
--- a/ldap/servers/plugins/acl/acllas.c
+++ b/ldap/servers/plugins/acl/acllas.c
@@ -3606,9 +3606,6 @@ acllas__client_match_URL (struct acl_pblock *aclpb, char *n_clientdn, char *url
/* dn was allocated in slapi_dn_normalize_ext */
slapi_ch_free_string(&dn);
}
- if (hostport && ('/' != *hostport)) {
- slapi_ch_free_string(&hostport);
- }
rc = slapi_ldap_url_parse(normed, &ludp, 1, NULL);
if (rc) {
slapi_log_error( SLAPI_LOG_FATAL, plugin_name,
@@ -3673,6 +3670,7 @@ acllas__client_match_URL (struct acl_pblock *aclpb, char *n_clientdn, char *url
result = ACL_FALSE;
done:
+ slapi_ch_free_string(&hostport);
ldap_free_urldesc( ludp );
slapi_ch_free_string(&normed);
slapi_filter_free ( f, 1 ) ;