projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
treewide: fix a few error messages
[collectd.git]
/
src
/
memcachec.c
diff --git
a/src/memcachec.c
b/src/memcachec.c
index
37f1894
..
a23d495
100644
(file)
--- a/
src/memcachec.c
+++ b/
src/memcachec.c
@@
-206,7
+206,7
@@
static int cmc_config_add_match (web_page_t *page, /* {{{ */
WARNING ("memcachec plugin: Ignoring arguments for the `Match' block.");
}
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.");
if (match == NULL)
{
ERROR ("memcachec plugin: malloc failed.");
@@
-263,7
+263,10
@@
static int cmc_config_add_match (web_page_t *page, /* {{{ */
} /* while (status == 0) */
if (status != 0)
} /* while (status == 0) */
if (status != 0)
+ {
+ cmc_web_match_free (match);
return (status);
return (status);
+ }
match->match = match_create_simple (match->regex, match->exclude_regex,
match->dstype);
match->match = match_create_simple (match->regex, match->exclude_regex,
match->dstype);
@@
-302,7
+305,7
@@
static int cmc_config_add_page (oconfig_item_t *ci) /* {{{ */
return (-1);
}
return (-1);
}
- page =
(web_page_t *)
malloc (sizeof (*page));
+ page = malloc (sizeof (*page));
if (page == NULL)
{
ERROR ("memcachec plugin: malloc failed.");
if (page == NULL)
{
ERROR ("memcachec plugin: malloc failed.");