Code

memcachec plugin: Fix memory leak.
authorFlorian Forster <octo@collectd.org>
Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)
committerFlorian Forster <octo@collectd.org>
Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200)
src/memcachec.c

index 7c8528d500492751cd035f580000a487f42d3cb6..72544fcf6de00b8afd4b9bbb16f35fd766501c26 100644 (file)
@@ -263,7 +263,10 @@ static int cmc_config_add_match (web_page_t *page, /* {{{ */
   } /* 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);