From owner-svn-src-head@FreeBSD.ORG Sun Feb 3 03:29:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 18C0E825 for ; Sun, 3 Feb 2013 03:29:36 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by mx1.freebsd.org (Postfix) with ESMTP id 9991225A for ; Sun, 3 Feb 2013 03:29:34 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id gf7so5749628lbb.18 for ; Sat, 02 Feb 2013 19:29:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=n9ocOUrA+EyX3p8Ze9ZaJwncO7T6XAICwitsgnCLpyg=; b=jkR0ubmP+EHI+GcCeRowvePWfOdgIs6jI5UQ19ZrfMFIqHL594DoemgS++k5YGB+HI Fhf9ODiIGod3r8+tqYbMS7kTqKRZtKmktG82DknQUPAnCFnlEShoHlHSR4QcPlnlLnL/ tyyW1fZX7VJ9xPc6uD7ylW8sMGde5jy6A0n6I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=n9ocOUrA+EyX3p8Ze9ZaJwncO7T6XAICwitsgnCLpyg=; b=IZ7pF/8SCTVnNxWCt5GDrkOgaPdKtlKSDsjE3nsBJFNDPQhdF2kf/a6F7ISx/eEKka ncfreHXMzqoTJDxhVujWYZgfao0aX6p6SdP41J/PlXbJutJiAeEvWeb3YD3J+Ix+cO0W AkIp/X7o01gslw2OJh0HEEqfPjyKy6YQsjylDcUU7TdUP+IpOeAzMHyG/hkUUEDjlo6h bsYg+T0AblhdND8UKg59TEyuBz+Qb/NPldU3+S/u2UkKjSgkwsLjP5nMF8/v8mr4vwni 8fzeFaH2tKjQw+hNrNGLVuvCQQkN4PmvaJGkco8hx6WwhA44Ae30LHXkV/UhKZBSHkb/ Cf/A== X-Received: by 10.152.106.5 with SMTP id gq5mr15502580lab.5.1359862173906; Sat, 02 Feb 2013 19:29:33 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.91.164 with HTTP; Sat, 2 Feb 2013 19:29:03 -0800 (PST) In-Reply-To: <201302030154.r131sQZm084127@svn.freebsd.org> References: <201302030154.r131sQZm084127@svn.freebsd.org> From: Eitan Adler Date: Sat, 2 Feb 2013 22:29:03 -0500 X-Google-Sender-Auth: TzUTALMaWWhR5LWiBlfusywj0-A Message-ID: Subject: Re: svn commit: r246278 - head/usr.sbin/crunch/crunchide To: "Pedro F. Giffuni" Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQk8tsC2uW9v/wL6qUSYWQkPdSdtpuw8P5ML/CqYVIdDzDAB8aRTaNTN1uND1H00eyuruXfN Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2013 03:29:36 -0000 On 2 February 2013 20:54, Pedro F. Giffuni wrote: > Author: pfg > Date: Sun Feb 3 01:54:25 2013 > New Revision: 246278 > URL: http://svnweb.freebsd.org/changeset/base/246278 > > Log: > crunch: Sync some NetBSD changes > > Fix a couple of free's in previous commit. > > Obtained from: NetBSD > MFC after: 1 week > > Modified: > head/usr.sbin/crunch/crunchide/exec_elf32.c > > Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c > ============================================================================== > --- head/usr.sbin/crunch/crunchide/exec_elf32.c Sun Feb 3 01:22:28 2013 (r246277) > +++ head/usr.sbin/crunch/crunchide/exec_elf32.c Sun Feb 3 01:54:25 2013 (r246278) > @@ -384,6 +384,8 @@ out: > if (symtabp != NULL) > free(symtabp); > if (strtabp != NULL) > + free(strtabp); > + if (nstrtabp != NULL) > free(nstrtabp); Why bother checking for NULL here? 7.22.2.3.2 says that free(NULL) results in no action. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams