summaryrefslogtreecommitdiff
path: root/ext/ldap
diff options
context:
space:
mode:
authorMichael Wallner <mike@php.net>2013-09-30 14:04:48 +0200
committerMichael Wallner <mike@php.net>2013-09-30 14:04:48 +0200
commitd4d6a95105feb3d7a39a5dfea7c4cd3080097295 (patch)
treea9e892279403551772d6878935debd286825ff92 /ext/ldap
parent6b68f44e6b46dffd7fe029eca7afc37f1fa57347 (diff)
parent2b78edfba25afac8f34ca65e18f98d23a4b8bcce (diff)
downloadphp-git-d4d6a95105feb3d7a39a5dfea7c4cd3080097295.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: fix test fix memleak on resetting rebind_proc
Diffstat (limited to 'ext/ldap')
-rw-r--r--ext/ldap/ldap.c1
-rw-r--r--ext/ldap/tests/ldap_search_variation6.phpt20
2 files changed, 17 insertions, 4 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index 3cfa2092e7..71d57d6d9b 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -2107,6 +2107,7 @@ PHP_FUNCTION(ldap_set_rebind_proc)
/* unregister rebind procedure */
if (ld->rebindproc != NULL) {
zval_dtor(ld->rebindproc);
+ FREE_ZVAL(ld->rebindproc);
ld->rebindproc = NULL;
ldap_set_rebind_proc(ld->link, NULL, NULL);
}
diff --git a/ext/ldap/tests/ldap_search_variation6.phpt b/ext/ldap/tests/ldap_search_variation6.phpt
index a29e4524df..5139ebb77d 100644
--- a/ext/ldap/tests/ldap_search_variation6.phpt
+++ b/ext/ldap/tests/ldap_search_variation6.phpt
@@ -217,14 +217,26 @@ array(2) {
[1]=>
resource(%d) of type (ldap result)
}
-NULL
-NULL
+array(1) {
+ ["count"]=>
+ int(0)
+}
+array(1) {
+ ["count"]=>
+ int(0)
+}
array(2) {
[0]=>
resource(%d) of type (ldap result)
[1]=>
resource(%d) of type (ldap result)
}
-NULL
-NULL
+array(1) {
+ ["count"]=>
+ int(0)
+}
+array(1) {
+ ["count"]=>
+ int(0)
+}
===DONE===