Skip to content

Commit 99b77e4

Browse files
committed
addressing GH-18799 remarks
1 parent de58691 commit 99b77e4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/pdo_sqlite/pdo_sqlite.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,10 @@ static int php_sqlite_collation_callback(void *context, int string1_len, const v
385385
zend_type_error("%s(): Return value of the collation callback must be of type int, %s returned",
386386
ZSTR_VAL(func_name), zend_zval_value_name(&retval));
387387
zend_string_release(func_name);
388-
ret = FAILURE;
388+
zval_ptr_dtor(&retval);
389+
return FAILURE;
389390
}
390391
ret = ZEND_NORMALIZE_BOOL(Z_LVAL(retval));
391-
zval_ptr_dtor(&retval);
392392
}
393393

394394
return ret;

ext/pdo_sqlite/sqlite_driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,10 +492,10 @@ static int php_sqlite3_collation_callback(void *context, int string1_len, const
492492
zend_type_error("%s(): Return value of the collation callback must be of type int, %s returned",
493493
ZSTR_VAL(func_name), zend_zval_value_name(&retval));
494494
zend_string_release(func_name);
495-
ret = FAILURE;
495+
zval_ptr_dtor(&retval);
496+
return FAILURE;
496497
}
497498
ret = ZEND_NORMALIZE_BOOL(Z_LVAL(retval));
498-
zval_ptr_dtor(&retval);
499499
}
500500

501501
return ret;

0 commit comments

Comments
 (0)