Skip to content

Ensure prepared statement is freed when lookupPrimaryKeyColumnNames throws#96

Open
hamzahrmalik wants to merge 1 commit into
apple:mainfrom
hamzahrmalik:fix_free
Open

Ensure prepared statement is freed when lookupPrimaryKeyColumnNames throws#96
hamzahrmalik wants to merge 1 commit into
apple:mainfrom
hamzahrmalik:fix_free

Conversation

@hamzahrmalik

@hamzahrmalik hamzahrmalik commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

When we create a PreparedStatement, we pass the pointer to the CassPrepared object. The PreparedStatement object then frees the pointer in the deinit. However, we might never get that far, if we throw in self.lookupPrimaryKeyColumnNames. Therefore, we must catch any errors there, and free the pointer

@hamzahrmalik hamzahrmalik marked this pull request as ready for review June 3, 2026 11:05
@yifan-c yifan-c added the 🔨 semver/patch No public API change. label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants