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

Consider releasing memory taken by strings before calling zbx_vector_str_destroy()

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.0rc2
    • Fix Version/s: 2.0.0rc3
    • Component/s: Agent (G)
    • Labels:

      Description

      zbx_vector_str_destroy() does not release memory used by individual strings contained in the vector. You have to do it explicitly, for example:
      ....
      for (i = 0; i < c_values.values_num; i++)
      zbx_free(c_values.values[i]);
      zbx_vector_str_destroy(&c_values);
      Check Zabbix source code for all places where zbx_vector_str_destroy() is used to avoid memory leaks.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              andris Andris Mednis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: