projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95c65d8
)
Fixed possible memory leak in case of broken match_value configs.
author
Sven Trenkel
<collectd@semidefinite.de>
Thu, 30 Sep 2010 10:59:21 +0000
(12:59 +0200)
committer
Sven Trenkel
<collectd@semidefinite.de>
Thu, 30 Sep 2010 10:59:21 +0000
(12:59 +0200)
src/match_value.c
patch
|
blob
|
history
diff --git
a/src/match_value.c
b/src/match_value.c
index
9f02226
..
ae6282c
100644
(file)
--- 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 */