From: michael Date: Mon, 29 Jun 2015 16:09:49 +0000 (+0000) Subject: - stats.c:fdstats_output(): fixed coverity CID 120798 (#1 of 1): Resource leak (RESOU... X-Git-Tag: 1.1.0beta1~9 X-Git-Url: http://git.serene-ircd.net/?a=commitdiff_plain;h=0b3ae9b7c4a0875957e535288d9570341782cde4;p=hopm.git - 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 --- 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);