Skip to content

Commit d4d6a95

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: fix test fix memleak on resetting rebind_proc
2 parents 6b68f44 + 2b78edf commit d4d6a95

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

ext/ldap/ldap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,6 +2107,7 @@ PHP_FUNCTION(ldap_set_rebind_proc)
21072107
/* unregister rebind procedure */
21082108
if (ld->rebindproc != NULL) {
21092109
zval_dtor(ld->rebindproc);
2110+
FREE_ZVAL(ld->rebindproc);
21102111
ld->rebindproc = NULL;
21112112
ldap_set_rebind_proc(ld->link, NULL, NULL);
21122113
}

ext/ldap/tests/ldap_search_variation6.phpt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,26 @@ array(2) {
217217
[1]=>
218218
resource(%d) of type (ldap result)
219219
}
220-
NULL
221-
NULL
220+
array(1) {
221+
["count"]=>
222+
int(0)
223+
}
224+
array(1) {
225+
["count"]=>
226+
int(0)
227+
}
222228
array(2) {
223229
[0]=>
224230
resource(%d) of type (ldap result)
225231
[1]=>
226232
resource(%d) of type (ldap result)
227233
}
228-
NULL
229-
NULL
234+
array(1) {
235+
["count"]=>
236+
int(0)
237+
}
238+
array(1) {
239+
["count"]=>
240+
int(0)
241+
}
230242
===DONE===

0 commit comments

Comments
 (0)