X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Futils_ignorelist.c;h=7b1c7d2547e915db1931eecdbeb9e34590e9e117;hb=dab48f284f9d4bb6ae98244310c5cdb6c5d91bf3;hp=0ad252bb79336bb6d98e11613a5c03b698a6de58;hpb=8aad55ab7d737a97d5927458b2b00885e27cae4d;p=collectd.git diff --git a/src/utils_ignorelist.c b/src/utils_ignorelist.c index 0ad252bb..7b1c7d25 100644 --- a/src/utils_ignorelist.c +++ b/src/utils_ignorelist.c @@ -131,6 +131,7 @@ static int ignorelist_append_regex(ignorelist_t *il, const char *entry) if (errsize) sfree (regerr); regfree (regtemp); + sfree (regtemp); return (1); } DEBUG("regex compiled: %s - %i", entry, rcompile); @@ -140,6 +141,7 @@ static int ignorelist_append_regex(ignorelist_t *il, const char *entry) { ERROR ("cannot allocate new config entry"); regfree (regtemp); + sfree (regtemp); return (1); } memset (new, '\0', sizeof(ignorelist_item_t)); @@ -248,6 +250,7 @@ void ignorelist_free (ignorelist_t *il) if (this->rmatch != NULL) { regfree (this->rmatch); + sfree (this->rmatch); this->rmatch = NULL; } #endif