X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_ignorelist.c;h=b8169ff656483a3d2e7c55c45a4cea2853d7dad2;hb=6a69ca987e1c3774428c9ab2778624ee80f343c6;hp=de42d0fa399035e0f2e3930866d2be670557fc72;hpb=efa4700ad47969749b0fca622294fd006b2d7cb8;p=collectd.git diff --git a/src/utils_ignorelist.c b/src/utils_ignorelist.c index de42d0fa..b8169ff6 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