@@ -87,7 +87,6 @@ typedef struct {
87
87
typedef struct {
88
88
LDAPMessage * data ;
89
89
BerElement * ber ;
90
- zval res ;
91
90
zend_object std ;
92
91
} ldap_result_entry ;
93
92
@@ -217,7 +216,6 @@ static void ldap_result_entry_free_obj(zend_object *obj)
217
216
ber_free (entry -> ber , 0 );
218
217
entry -> ber = NULL ;
219
218
}
220
- zval_ptr_dtor (& entry -> res );
221
219
222
220
zend_object_std_dtor (& entry -> std );
223
221
}
@@ -233,7 +231,7 @@ static void ldap_result_entry_free_obj(zend_object *obj)
233
231
#define VERIFY_LDAP_RESULT_OPEN (lr ) \
234
232
{ \
235
233
if (!lr->result) { \
236
- zend_throw_error(NULL, "LDAP result has already been freed "); \
234
+ zend_throw_error(NULL, "LDAP result has already been closed "); \
237
235
RETURN_THROWS(); \
238
236
} \
239
237
}
@@ -1167,7 +1165,6 @@ PHP_FUNCTION(ldap_connect)
1167
1165
size_t urllen = hostlen + sizeof ( "ldap://:65535" );
1168
1166
1169
1167
if (port <= 0 || port > 65535 ) {
1170
- zval_ptr_dtor (return_value );
1171
1168
zend_argument_value_error (2 , "must be between 1 and 65535" );
1172
1169
RETURN_THROWS ();
1173
1170
}
@@ -1918,7 +1915,6 @@ PHP_FUNCTION(ldap_first_entry)
1918
1915
} else {
1919
1916
object_init_ex (return_value , ldap_result_entry_ce );
1920
1917
resultentry = Z_LDAP_RESULT_ENTRY_P (return_value );
1921
- ZVAL_COPY (& resultentry -> res , result );
1922
1918
resultentry -> data = entry ;
1923
1919
resultentry -> ber = NULL ;
1924
1920
}
@@ -1947,7 +1943,6 @@ PHP_FUNCTION(ldap_next_entry)
1947
1943
} else {
1948
1944
object_init_ex (return_value , ldap_result_entry_ce );
1949
1945
resultentry_next = Z_LDAP_RESULT_ENTRY_P (return_value );
1950
- ZVAL_COPY (& resultentry_next -> res , & resultentry -> res );
1951
1946
resultentry_next -> data = entry_next ;
1952
1947
resultentry_next -> ber = NULL ;
1953
1948
}
@@ -3600,7 +3595,6 @@ PHP_FUNCTION(ldap_first_reference)
3600
3595
} else {
3601
3596
object_init_ex (return_value , ldap_result_entry_ce );
3602
3597
resultentry = Z_LDAP_RESULT_ENTRY_P (return_value );
3603
- ZVAL_COPY (& resultentry -> res , result );
3604
3598
resultentry -> data = entry ;
3605
3599
resultentry -> ber = NULL ;
3606
3600
}
@@ -3629,7 +3623,6 @@ PHP_FUNCTION(ldap_next_reference)
3629
3623
} else {
3630
3624
object_init_ex (return_value , ldap_result_entry_ce );
3631
3625
resultentry_next = Z_LDAP_RESULT_ENTRY_P (return_value );
3632
- ZVAL_COPY (& resultentry_next -> res , & resultentry -> res );
3633
3626
resultentry_next -> data = entry_next ;
3634
3627
resultentry_next -> ber = NULL ;
3635
3628
}
0 commit comments