From: Ruben Kerkhof Date: Fri, 27 Nov 2015 21:00:10 +0000 (+0100) Subject: processes.c: plug memory leak in error path X-Git-Tag: collectd-5.5.1~40^2~26 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e01209268a710341765879eb32412027fb60257d;p=collectd.git processes.c: plug memory leak in error path Found with Infer (http://fbinfer.com/) Signed-off-by: Florian Forster --- diff --git a/src/processes.c b/src/processes.c index 516104f0..bcc4ad54 100644 --- a/src/processes.c +++ b/src/processes.c @@ -276,6 +276,7 @@ static void ps_list_register (const char *name, const char *regexp) { DEBUG ("ProcessMatch: compiling the regular expression \"%s\" failed.", regexp); sfree(new->re); + sfree(new); return; } }