X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fmatch_value.c;h=ae6282c4afa4a54083a745ba14bcaa01873d3eca;hb=61a1fa91ba73e4fe3a34949f77c5f017056f2b7a;hp=9f02226bdae67109f94a4139cb2f6b60f26cdb34;hpb=c57f2a191b63ce73fc432befebe9fa3af97c8eb5;p=collectd.git diff --git a/src/match_value.c b/src/match_value.c index 9f02226b..ae6282c4 100644 --- a/src/match_value.c +++ b/src/match_value.c @@ -53,9 +53,18 @@ struct mv_match_s */ static void mv_free_match (mv_match_t *m) /* {{{ */ { + int i; + if (m == NULL) return; + if (m->data_sources != NULL) + { + for (i = 0; i < m->data_sources_num; ++i) + free(m->data_sources[i]); + free(m->data_sources); + } + free (m); } /* }}} void mv_free_match */