From: Corey Kosak Date: Fri, 22 Jan 2016 22:22:18 +0000 (-0500) Subject: The field 're' only exists if HAVE_REGEX_H is defined (see definition at X-Git-Tag: collectd-5.5.2~6^2~44 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=5c19a9f696f52cf2747349967843bd725133e915;p=collectd.git The field 're' only exists if HAVE_REGEX_H is defined (see definition at line 194). So, consistent with all other usages, this should be protected with an #if guard. --- diff --git a/src/processes.c b/src/processes.c index aca18b99..f0305694 100644 --- a/src/processes.c +++ b/src/processes.c @@ -302,7 +302,9 @@ static void ps_list_register (const char *name, const char *regexp) "`ProcessMatch' with the same name. " "All but the first setting will be " "ignored."); +#if HAVE_REGEX_H sfree (new->re); +#endif sfree (new); return; }