From 38f1d841840096c00a3d0b57bc2c86b6a256f303 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 17 Dec 2016 18:50:58 +0100 Subject: [PATCH] dpdkstat: don't close already closed fd on failure CID #158525 --- src/dpdkstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.30.2