Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-10493

Potential memory leak in case of retries in web-scenarios

    Details

      Description

      From process_httptest():

                      /* try to retrieve page several times depending on number of retries */
                      do
                      {
                              memset(&page, 0, sizeof(page));
      
                              if (CURLE_OK == (err = curl_easy_perform(easyhandle)))
                                      break;
                      }
                      while (0 < --httptest->httptest.retries);
      

      page contains dynamically-allocated write buffer data which is managed by write-callback WRITEFUNCTION2(). If it was called by the libcurl (curl_easy_perform()) but the (re)try failed then we'll lose the allocated memory (data set to 0 with memset()).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sandis.neilands Sandis Neilands (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: