From owner-cvs-all@FreeBSD.ORG Tue May 22 04:21:02 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 73D9816A469; Tue, 22 May 2007 04:21:02 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 160B313C45B; Tue, 22 May 2007 04:21:02 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l4M4L1Cu072301; Tue, 22 May 2007 04:21:01 GMT (envelope-from cperciva@repoman.freebsd.org) Received: (from cperciva@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l4M4L19U072294; Tue, 22 May 2007 04:21:01 GMT (envelope-from cperciva) Message-Id: <200705220421.l4M4L19U072294@repoman.freebsd.org> From: Colin Percival Date: Tue, 22 May 2007 04:21:01 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/bin/rcp rcp.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2007 04:21:02 -0000 cperciva 2007-05-22 04:21:01 UTC FreeBSD src repository Modified files: bin/rcp rcp.c Log: In the error handling path, don't call close(fd) if the error we're handling is that fd = open(foo) is -1. This bug is harmless since close(-1) just returns an error (which the code ignores). Found by: Coverity Prevent(tm) CID: 1503 (in userland test run) Revision Changes Path 1.46 +2 -1 src/bin/rcp/rcp.c