From owner-cvs-src@FreeBSD.ORG Tue Jan 17 04:49:05 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 097D616A41F; Tue, 17 Jan 2006 04:49:05 +0000 (GMT) (envelope-from kientzle@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB21B43D45; Tue, 17 Jan 2006 04:49:04 +0000 (GMT) (envelope-from kientzle@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k0H4n4DW061602; Tue, 17 Jan 2006 04:49:04 GMT (envelope-from kientzle@repoman.freebsd.org) Received: (from kientzle@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0H4n42P061601; Tue, 17 Jan 2006 04:49:04 GMT (envelope-from kientzle) Message-Id: <200601170449.k0H4n42P061601@repoman.freebsd.org> From: Tim Kientzle Date: Tue, 17 Jan 2006 04:49:04 +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/lib/libarchive archive_read.c archive_read_open_fd.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2006 04:49:05 -0000 kientzle 2006-01-17 04:49:04 UTC FreeBSD src repository Modified files: lib/libarchive archive_read.c archive_read_open_fd.c Log: If the attempt to open the archive fails (either the client open routine fails or the first read fails), invoke the client close routine immediately so the client can clean up. Also, don't store the client pointers in this case, so that the client close routine can't accidentally get called more than once. A minor style fix to archive_read_open_fd.c while I'm here. PR: 86453 Thanks to: Andrew Turner for reporting this and suggesting a fix. Revision Changes Path 1.20 +36 -13 src/lib/libarchive/archive_read.c 1.5 +2 -1 src/lib/libarchive/archive_read_open_fd.c