Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions ext/oci8/oci8.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,12 +573,8 @@ void php_oci_column_hash_dtor(zval *data)
zend_list_close(column->stmtid);
}

if (column->descid) {
if (GC_REFCOUNT(column->descid) == 1)
zend_list_close(column->descid);
else {
GC_DELREF(column->descid);
}
if (column->descid && !GC_DELREF(column->descid)) {
zend_list_close(column->descid);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the original code wanted to call zend_list_delete instead of zend_list_close.
Your fix is fine, but can be improved further by using zend_list_free instead of zend_list_close as we already know the refcount is 0.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That code is different.

}

if (column->data) {
Expand Down
Loading