From owner-cvs-src@FreeBSD.ORG Fri May 23 05:07:22 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7D09106567F; Fri, 23 May 2008 05:07:22 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B462E8FC1F; Fri, 23 May 2008 05:07:22 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4N57MHs040105; Fri, 23 May 2008 05:07:22 GMT (envelope-from cperciva@repoman.freebsd.org) Received: (from cperciva@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4N57MUH040104; Fri, 23 May 2008 05:07:22 GMT (envelope-from cperciva) Message-Id: <200805230507.m4N57MUH040104@repoman.freebsd.org> From: Colin Percival Date: Fri, 23 May 2008 05:07:22 +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/usr.bin/tar write.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: Fri, 23 May 2008 05:07:22 -0000 cperciva 2008-05-23 05:07:22 UTC FreeBSD src repository Modified files: usr.bin/tar write.c Log: The value le->name cannot be NULL when we're freeing an entry in the hardlink table for two reasons: 1. If le->name is set to NULL, the structure le won't be inserted into the table; 2. Even if le somehow did manage to get into the table with le->name equal to NULL, we would die when we dereferenced le->null before we could get to the point of freeing the entry. Remove the unnecessary "if (le->name != NULL)" test and just free the pointer. Found by: Coverity Prevent Revision Changes Path 1.69 +1 -2 src/usr.bin/tar/write.c