From 0b3ae9b7c4a0875957e535288d9570341782cde4 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 29 Jun 2015 16:09:49 +0000 Subject: [PATCH] - stats.c:fdstats_output(): fixed coverity CID 120798 (#1 of 1): Resource leak (RESOURCE_LEAK) git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@6219 82007160-df01-0410-b94d-b575c5fd34c7 --- src/stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stats.c b/src/stats.c index 665add5..00d4c16 100644 --- a/src/stats.c +++ b/src/stats.c @@ -209,7 +209,7 @@ fdstats_output(const char *target) { int newfd = dup(i); - if (newfd > 0) + if (newfd > -1) { ++total_fd_use; close(newfd); -- 2.30.2