author | Mytnyk, VolodymyrX <volodymyrx.mytnyk@intel.com> | |
Mon, 6 Feb 2017 11:28:33 +0000 (11:28 +0000) | ||
committer | Mytnyk, VolodymyrX <volodymyrx.mytnyk@intel.com> | |
Mon, 6 Feb 2017 11:57:16 +0000 (11:57 +0000) | ||
commit | 57812edf81a62d0b8a49a2399ee26c9e611c65e2 | |
tree | 83eb740e09f4002c82cd38a3299dce2efe68b733 | tree | snapshot |
parent | acb5a3393b5ffcd73eeaa06c91e98e4ba9a58469 | commit | diff |
python: Fix python plugin crash
If python pugin reads and writes collectd values, the write python
plugin callback may crash (90%) on free table var (line 478) if the
meta data structure is created but no information is present there.
It's possible to reproduce it due to changes introduced by #2135 PR.
cpy_write_callback():
...
425 if (value_list->meta) {
426 char **table;
427 meta_data_t *meta = value_list->meta;
428
429 int num = meta_data_toc(meta, &table);
430 for (int i = 0; i < num; ++i) {
...
477 }
478 free(table);
479 }
Change-Id: Ic897933f447b9280f266b6e78b6b73bd12182eba
Signed-off-by: Mytnyk, VolodymyrX <volodymyrx.mytnyk@intel.com>
If python pugin reads and writes collectd values, the write python
plugin callback may crash (90%) on free table var (line 478) if the
meta data structure is created but no information is present there.
It's possible to reproduce it due to changes introduced by #2135 PR.
cpy_write_callback():
...
425 if (value_list->meta) {
426 char **table;
427 meta_data_t *meta = value_list->meta;
428
429 int num = meta_data_toc(meta, &table);
430 for (int i = 0; i < num; ++i) {
...
477 }
478 free(table);
479 }
Change-Id: Ic897933f447b9280f266b6e78b6b73bd12182eba
Signed-off-by: Mytnyk, VolodymyrX <volodymyrx.mytnyk@intel.com>
src/python.c | diff | blob | history | |
src/pyvalues.c | diff | blob | history |