diff options
author | Stig Venaas <venaas@php.net> | 2001-07-15 11:12:28 +0000 |
---|---|---|
committer | Stig Venaas <venaas@php.net> | 2001-07-15 11:12:28 +0000 |
commit | eabe8fcf8d19963772d71b2485509989a674f701 (patch) | |
tree | af969dcd67bb23ca07605e229638115751b52824 /ext/ldap/ldap.c | |
parent | 393d7676eb1e035306bdd038f765bf29f949e97c (diff) | |
download | php-git-eabe8fcf8d19963772d71b2485509989a674f701.tar.gz |
Fixed memory leaks in ldap_get_entries() and ldap_get_dn() when using
RFC1823 API
# These leaks have always been there, will fix in PHP3
@- Fixed various memory leaks in the LDAP extension (Stig Venaas)
Diffstat (limited to 'ext/ldap/ldap.c')
-rw-r--r-- | ext/ldap/ldap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 9e1f0b7971..f7479aa443 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -960,6 +960,8 @@ PHP_FUNCTION(ldap_get_entries) add_assoc_string(tmp1, "dn", dn, 1); #if ( LDAP_API_VERSION > 2000 ) || HAVE_NSLDAP || WINDOWS ldap_memfree(dn); +#else + free(dn); #endif zend_hash_index_update(return_value->value.ht, num_entries, (void *) &tmp1, sizeof(pval *), NULL); @@ -1194,6 +1196,8 @@ PHP_FUNCTION(ldap_get_dn) RETVAL_STRING(text,1); #if ( LDAP_API_VERSION > 2000 ) || HAVE_NSLDAP || WINDOWS ldap_memfree(text); +#else + free(text); #endif } else { RETURN_FALSE; |