From: Matthias Urlichs Date: Wed, 5 Feb 2014 09:49:24 +0000 (+0100) Subject: Please free strings *after* printing them ;-) X-Git-Tag: collectd-5.3.2~75 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=b21ab82a9ffe2a74a29c1dd606cb2ca7db6cd985;p=collectd.git Please free strings *after* printing them ;-) Signed-off-by: Florian Forster --- diff --git a/src/common.c b/src/common.c index c41c4fe6..9c4e64f6 100644 --- a/src/common.c +++ b/src/common.c @@ -1020,9 +1020,9 @@ int parse_value (const char *value_orig, value_t *ret_value, int ds_type) } if (value == endptr) { - sfree (value); ERROR ("parse_value: Failed to parse string as %s: %s.", DS_TYPE_TO_STRING (ds_type), value); + sfree (value); return -1; } else if ((NULL != endptr) && ('\0' != *endptr))