From: Ruben Kerkhof Date: Fri, 4 Dec 2015 22:21:31 +0000 (+0100) Subject: Pinba plugin: close fd on error X-Git-Tag: collectd-5.5.1~31^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=df6d9bfc1b24ecf4ebd1c86a57fc39f3b25abbb2;p=collectd.git Pinba plugin: close fd on error CID #38001 Signed-off-by: Florian Forster --- diff --git a/src/pinba.c b/src/pinba.c index e7bf2aac..1a077065 100644 --- a/src/pinba.c +++ b/src/pinba.c @@ -336,6 +336,7 @@ static int pb_add_socket (pinba_socket_t *s, /* {{{ */ char errbuf[1024]; ERROR ("pinba plugin: bind(2) failed: %s", sstrerror (errno, errbuf, sizeof (errbuf))); + close (fd); return (0); }