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()

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 2.0.0rc3
    • 2.0.0rc2
    • Agent (G)

      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.

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

              Created:
              Updated:
              Resolved: