Skip to content

Commit 62b76bf

Browse files
committed
Decrease the reference count before calling zend_list_close()
1 parent 54e662c commit 62b76bf

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ext/oci8/oci8.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -573,12 +573,8 @@ void php_oci_column_hash_dtor(zval *data)
573573
zend_list_close(column->stmtid);
574574
}
575575

576-
if (column->descid) {
577-
if (GC_REFCOUNT(column->descid) == 1)
578-
zend_list_close(column->descid);
579-
else {
580-
GC_DELREF(column->descid);
581-
}
576+
if (column->descid && !GC_DELREF(column->descid)) {
577+
zend_list_close(column->descid);
582578
}
583579

584580
if (column->data) {

0 commit comments

Comments
 (0)