Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-602

Memory leak in non blocking mode

    XMLWordPrintable

Details

    Description

      This issue was initialliy
      reported by Hyung Hwan in PR #199

      If an attempt to connect to a remote server was aborted via mysql_close() allocated memory for addrinfo wlll not be freed.

      Example:

      int main()
      {
              MYSQL mysql, *ret;
              MYSQL_RES *res;
              MYSQL_ROW row;
              int status;
       
              mysql_init(&mysql);
              mysql_options(&mysql, MYSQL_OPT_NONBLOCK, 0);
       
              status= mysql_real_connect_start(&ret, &mysql, "10.10.10.10", "username", "password", NULL, 3306, NULL, 0);
              mysql_close (&mysql);
       
              return 0;
      }
      

      Attachments

        Activity

          People

            georg Georg Richter
            georg Georg Richter
            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.