Date: Thu, 5 Feb 2015 16:09:41 +0000 (UTC) From: Veniamin Gvozdikov <vg@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r378467 - in head/sysutils/cbsd: . files Message-ID: <201502051609.t15G9fKY000112@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vg Date: Thu Feb 5 16:09:40 2015 New Revision: 378467 URL: https://svnweb.freebsd.org/changeset/ports/378467 QAT: https://qat.redports.org/buildarchive/r378467/ Log: - Fix resource leaks PR: ports/197350 Submitted by: olevole@olevole.ru (maintainer) Added: head/sysutils/cbsd/files/patch-bin-cbsdsh-cbsd_fwatch.c (contents, props changed) Modified: head/sysutils/cbsd/Makefile Modified: head/sysutils/cbsd/Makefile ============================================================================== --- head/sysutils/cbsd/Makefile Thu Feb 5 16:03:32 2015 (r378466) +++ head/sysutils/cbsd/Makefile Thu Feb 5 16:09:40 2015 (r378467) @@ -2,6 +2,7 @@ PORTNAME= cbsd PORTVERSION= 10.1.4 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= olevole@olevole.ru Added: head/sysutils/cbsd/files/patch-bin-cbsdsh-cbsd_fwatch.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/cbsd/files/patch-bin-cbsdsh-cbsd_fwatch.c Thu Feb 5 16:09:40 2015 (r378467) @@ -0,0 +1,39 @@ +--- bin/cbsdsh/cbsd_fwatch.c.orig 2015-02-05 17:33:24.019144000 +0300 ++++ bin/cbsdsh/cbsd_fwatch.c 2015-02-05 16:57:53.000000000 +0300 +@@ -95,7 +95,6 @@ + return 1; + } + +- + if ((fd = open(watchfile, O_RDONLY)) == -1) { + out2fmt_flush("Cannot open: %s\n", watchfile); + ckfree(watchfile); +@@ -117,6 +116,7 @@ + out2fmt_flush("kevent\n"); + close(fd); + ckfree(watchfile); ++ close(kq); + return 1; + } + +@@ -134,9 +134,12 @@ + out2fmt_flush("kevent\n"); + close(fd); + ckfree(watchfile); ++ close(kq); + return 1; + } + ++ close(kq); ++ + if (nev != 0) { + if (ev.fflags & NOTE_DELETE) { + out2fmt_flush("deleted\n"); +@@ -173,5 +176,7 @@ + ev.fflags &= ~NOTE_REVOKE; + } + } ++ ++ ckfree(watchfile); + return 0; + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502051609.t15G9fKY000112>