Skip to content

Fix GH-13998: Manage refcount of agg_context->val correctly #14004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
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
Prev Previous commit
Manage refcount of agg_context->val correctly
When step_callback fails, agg_context->val is passed dtor, but agg_context->val
is also used in final_callback regardless of the success/failure of step_callback,
so should not call dtor.
  • Loading branch information
SakiTakamachi committed Apr 19, 2024
commit a3a2e02b0c049a36cd67a688cfde10bfba784e11
1 change: 0 additions & 1 deletion ext/pdo_sqlite/sqlite_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ static int do_callback(struct pdo_sqlite_fci *fc, zval *cb,
* the context */
if (agg_context) {
if (Z_ISUNDEF(retval)) {
zval_ptr_dtor(&agg_context->val);
return FAILURE;
}
zval_ptr_dtor(Z_REFVAL(agg_context->val));
Expand Down