summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 65ca93d)
raw | patch | inline | side by side (parent: 65ca93d)
author | Florian Forster <octo@collectd.org> | |
Fri, 19 Jun 2015 08:54:02 +0000 (10:54 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 19 Jun 2015 08:58:24 +0000 (10:58 +0200) |
Turns out, regfree(3) cleans up the memory allocated by regcomp(3), but
not the pointer itself.
not the pointer itself.
src/utils_ignorelist.c | patch | blob | history |
diff --git a/src/utils_ignorelist.c b/src/utils_ignorelist.c
index de42d0fa399035e0f2e3930866d2be670557fc72..b8169ff656483a3d2e7c55c45a4cea2853d7dad2 100644 (file)
--- a/src/utils_ignorelist.c
+++ b/src/utils_ignorelist.c
if (errsize)
sfree (regerr);
regfree (regtemp);
+ sfree (regtemp);
return (1);
}
DEBUG("regex compiled: %s - %i", entry, rcompile);
{
ERROR ("cannot allocate new config entry");
regfree (regtemp);
+ sfree (regtemp);
return (1);
}
memset (new, '\0', sizeof(ignorelist_item_t));
if (this->rmatch != NULL)
{
regfree (this->rmatch);
+ sfree (this->rmatch);
this->rmatch = NULL;
}
#endif