diff --git a/src/memcachec.c b/src/memcachec.c
index 7c8528d500492751cd035f580000a487f42d3cb6..a23d4956e1e978b0910ab1ef05e8a4ed5b930de4 100644 (file)
--- a/src/memcachec.c
+++ b/src/memcachec.c
*
* Authors:
* Doug MacEachern <Doug.MacEachern at hyperic.com>
- * Florian octo Forster <octo at verplant.org>
+ * Florian octo Forster <octo at collectd.org>
**/
#include "collectd.h"
WARNING ("memcachec plugin: Ignoring arguments for the `Match' block.");
}
- match = (web_match_t *) malloc (sizeof (*match));
+ match = malloc (sizeof (*match));
if (match == NULL)
{
ERROR ("memcachec plugin: malloc failed.");
} /* while (status == 0) */
if (status != 0)
+ {
+ cmc_web_match_free (match);
return (status);
+ }
match->match = match_create_simple (match->regex, match->exclude_regex,
match->dstype);
return (-1);
}
- page = (web_page_t *) malloc (sizeof (*page));
+ page = malloc (sizeof (*page));
if (page == NULL)
{
ERROR ("memcachec plugin: malloc failed.");