Uploaded image for project: 'MariaDB Connector/C++'
  1. MariaDB Connector/C++
  2. CONCPP-63

Thrown Exceptions created by ExceptionFactory::create() could leak memory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.4, 1.0.0
    • Fix Version/s: 1.0.0
    • Component/s: General
    • Labels:
      None

      Description

      If the created exception was a subclass as SQLException, it(or it's copy) would eventually be destructed as SQLException. Thus, everything but SQLException would leak. That happened, because as a quick solution at the time, they all were thrown as SQLException. Caught as SQLException&(they could not be caught as an exception of its own class), they would be destructed as SQLException.
      As a solution, create will throw right away the correct type of exception. Anyway It's only used to be thrown everywhere. And seemingly there is no sense to keep it returning exception object. Once such need arises, it can be changed

        Attachments

          Activity

            People

            Assignee:
            Lawrin Lawrin Novitsky
            Reporter:
            Lawrin Lawrin Novitsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.