Skip to content

Commit d0a6b10

Browse files
committed
Use zval_ptr_dtor() to replace bound variables (original values nay be circular structures).
1 parent 5f83904 commit d0a6b10

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/mysqlnd/mysqlnd_ps.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, void * param, const unsign
799799
ZVAL_DEREF(result);
800800
/* Clean what we copied last time */
801801
#ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF
802-
zval_dtor(result);
802+
zval_ptr_dtor(result);
803803
#endif
804804
/* copy the type */
805805
if (stmt->result_bind[i].bound == TRUE) {
@@ -909,7 +909,7 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, const unsi
909909
in result->unbuf->m.free_last_data()
910910
*/
911911
#ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF
912-
zval_dtor(result);
912+
zval_ptr_dtor(result);
913913
#endif
914914
if (!Z_ISNULL_P(data)) {
915915
if ((Z_TYPE_P(data) == IS_STRING) && (meta->fields[i].max_length < (zend_ulong) Z_STRLEN_P(data))){
@@ -1094,7 +1094,7 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, const unsigned
10941094
in result->unbuf->m.free_last_data()
10951095
*/
10961096
#ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF
1097-
zval_dtor(result);
1097+
zval_ptr_dtor(result);
10981098
#endif
10991099
DBG_INF_FMT("i=%u bound_var=%p type=%u refc=%u", i, &stmt->result_bind[i].zv,
11001100
Z_TYPE_P(data), Z_REFCOUNTED(stmt->result_bind[i].zv)?
@@ -1203,7 +1203,7 @@ MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const s, zend_bool * const fe
12031203
if (stmt->result_bind[i].bound == TRUE) {
12041204
zval *result = &stmt->result_bind[i].zv;
12051205
ZVAL_DEREF(result);
1206-
zval_dtor(result);
1206+
zval_ptr_dtor(result);
12071207
ZVAL_NULL(result);
12081208
}
12091209
}

0 commit comments

Comments
 (0)