Skip to content

Conversation

@arcolight
Copy link
Contributor

https://issues.apache.org/jira/browse/IGNITE-27136

Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:

The Review Checklist

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - There is a single JIRA ticket related to the pull request.
    - The web-link to the pull request is attached to the JIRA ticket.
    - The JIRA ticket has the Patch Available state.
    - The description of the JIRA ticket explains WHAT was made, WHY and HOW.
    - The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

@arcolight arcolight requested a review from isapego as a code owner November 27, 2025 10:31
@isapego isapego requested a review from Copilot November 27, 2025 11:08
Copilot finished reviewing on behalf of isapego November 27, 2025 11:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a memory leak in the C++ ODBC SSL socket implementation by properly managing OpenSSL BIO resources. The root cause was that the code stored and freed only the SSL* pointer, which leaked the BIO object. The fix changes the class to store the BIO* pointer instead and uses BIO_free_all_ for cleanup, which properly frees both the BIO and its associated SSL structure.

  • Refactored secure_socket_client to store BIO* instead of SSL* as the primary resource
  • Added helper functions to safely extract SSL* from BIO* with proper error handling
  • Updated resource cleanup to use BIO_free_all_ instead of SSL_free_

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
modules/platforms/cpp/ignite/network/ssl/secure_socket_client.h Renamed member variable from m_ssl to m_bio with updated comment to reflect it stores the BIO interface
modules/platforms/cpp/ignite/network/ssl/secure_socket_client.cpp Added helper functions to extract SSL from BIO, updated make_ssl to return BIO*, modified all SSL usage sites to extract SSL from BIO, and changed cleanup to use BIO_free_all_

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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