From: Ruben Kerkhof Date: Sat, 17 Dec 2016 17:50:58 +0000 (+0100) Subject: dpdkstat: don't close already closed fd on failure X-Git-Tag: collectd-5.7.1~8^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=38f1d841840096c00a3d0b57bc2c86b6a256f303;p=collectd.git dpdkstat: don't close already closed fd on failure CID #158525 --- diff --git a/src/dpdkstat.c b/src/dpdkstat.c index de75c0c0..18725ada 100644 --- a/src/dpdkstat.c +++ b/src/dpdkstat.c @@ -289,13 +289,13 @@ static int dpdk_shm_init(size_t size) { if (err) { ERROR("dpdkstat semaphore init failed: %s", sstrerror(errno, errbuf, sizeof(errbuf))); - goto fail_close; + goto close; } err = sem_init(&g_configuration->sema_stats_in_shm, 1, 0); if (err) { ERROR("dpdkstat semaphore init failed: %s", sstrerror(errno, errbuf, sizeof(errbuf))); - goto fail_close; + goto close; } g_configuration->xstats = NULL;