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

History cache memory leak

XMLWordPrintable

      DCcalculate_item_delta_float() function generates error message if the resulting value is out of acceptable double value range. This message is stored in ZBX_DC_HISTORY:value_orig.err field which is not freed.

      Before history cache changes all ZBX_DC_HISTORY text data was allocated on heap and properly freed afterwards. Now the ZBX_DC_HISTORY error and text fields are references to the history cache shared memory and shouldn't be freed. The simplest (but not cleanest). solution would be to add ownership flags to the ZBX_DC_HISTORY. Anoher solution would be to duplicate all ZBX_DC_HISTORY text values on heap. There would be some overhead, but it looks more robust solution.

            Unassigned Unassigned
            wiper Andris Zeila
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: