Skip to content
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

Fix for issue #47 - double free of COL_INFO object #48

Merged

Conversation

progmachine
Copy link
Contributor

  • Fix for issue Memory Corruption using version 16.00.0005 #47 - double free of COL_INFO object due to refcount breakage during reuse of directly found object in getColumnsInfo(...).
  • One more possible memory leak of COL_INFO objects in getColumnsInfo(...).

…ct due to refcount

breakage during reuse of directly found object in getColumnsInfo(...).
One more possible memory leak of COL_INFO objects in
getColumnsInfo(...).

Signed-off-by: Alexandr Kuznetsov <[email protected]>
parse.c Outdated
@@ -882,6 +882,8 @@ getColumnsInfo(ConnectionClass *conn, TABLE_INFO *wti, OID greloid, StatementCla
if (coli_exist)
{
/* We have ready to use coli object. Cleaning it. */
tmp_refcnt = coli->refcnt; /* If we found coli with greloid, then some TABLE_INFO objects may have references to it -> save refcnt for them. */
tmp_refcnt--; /* Down the road we will increase refcnt again to account for the refernce from ConnectionClass object to coli object. */
Copy link
Contributor

Choose a reason for hiding this comment

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

spelling mistake "refernce" in comment

Signed-off-by: Alexandr Kuznetsov <[email protected]>
@davecramer
Copy link
Contributor

@progmachine Thankyou

@progmachine
Copy link
Contributor Author

How do you think, do we need to make the 16.0.6 bugfix release?

@davecramer
Copy link
Contributor

Yes, I am going to release 16.0.6 and then fast follow with 17 today

@davecramer davecramer merged commit 563ad6c into postgresql-interfaces:main Sep 27, 2024
1 check passed
@progmachine progmachine deleted the bugfix_47-refcnt_info_lose branch September 27, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants