Skip to content

ext/mysqlnd: Fix close_on_server#21765

Open
kamil-tekiela wants to merge 2 commits intophp:masterfrom
kamil-tekiela:Fix-close_on_server
Open

ext/mysqlnd: Fix close_on_server#21765
kamil-tekiela wants to merge 2 commits intophp:masterfrom
kamil-tekiela:Fix-close_on_server

Conversation

@kamil-tekiela
Copy link
Copy Markdown
Member

No description provided.

Comment thread ext/mysqlnd/mysqlnd_ps.c
if (ret == FAIL) {
COPY_CLIENT_ERROR(stmt->error_info, *conn->error_info);
DBG_RETURN(FAIL);
/* Don't return early - continue with cleanup to prevent memory leaks */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we do not return early here, won’t this end up returning PASS?

It introduces a bit of code duplication, but how about adding the cleanup logic here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Is this better now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants