cvs: php4 /ext/ldap ldap.c

From: Date: Sun, 15 Jul 2001 11:12:28 +0000
Subject: cvs: php4 /ext/ldap ldap.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6226@lists.php.net to get a copy of this message
venaas Sun Jul 15 07:12:28 2001 EDT Modified files: /php4/ext/ldap ldap.c Log: 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) Index: php4/ext/ldap/ldap.c diff -u php4/ext/ldap/ldap.c:1.89 php4/ext/ldap/ldap.c:1.90 --- php4/ext/ldap/ldap.c:1.89 Sat Jun 23 09:43:20 2001 +++ php4/ext/ldap/ldap.c Sun Jul 15 07:12:28 2001 @@ -22,7 +22,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ldap.c,v 1.89 2001/06/23 13:43:20 venaas Exp $ */ +/* $Id: ldap.c,v 1.90 2001/07/15 11:12:28 venaas Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -254,7 +254,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "LDAP Support", "enabled" ); - php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.89 2001/06/23 13:43:20 venaas Exp $" ); + php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.90 2001/07/15 11:12:28 venaas Exp $" ); php_info_print_table_row(2, "Total Links", maxl ); #ifdef LDAP_API_VERSION @@ -960,6 +960,8 @@ 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 @@ RETVAL_STRING(text,1); #if ( LDAP_API_VERSION > 2000 ) || HAVE_NSLDAP || WINDOWS ldap_memfree(text); +#else + free(text); #endif } else { RETURN_FALSE;

« previous php.cvs (#6226) next »