From owner-svn-src-all@FreeBSD.ORG Wed Jan 16 17:48:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1FFD1BC4 for ; Wed, 16 Jan 2013 17:48:24 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) by mx1.freebsd.org (Postfix) with ESMTP id 9E549DD4 for ; Wed, 16 Jan 2013 17:48:23 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id fj20so1691280lab.24 for ; Wed, 16 Jan 2013 09:48:22 -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=kjEH5x/zIp3U6wOR+d2W8zqX44EDt75L0hz8m9fUcKk=; b=DJAYmILR6wbgQvpH9I/5edSAER/mttcyhGn2TJVA0Yz7dirBlh4xG4yJT+7fBiPHRV WAnGzzN3150aS90VCZwUGcSUyvDrY9QuC5kKA1oLwHAj7peyAzQN47UEAFU64Fv6xVY4 wTtt8rZTgGnJjzLxZp+ylZuJdHLVmuW1sio7A= 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=kjEH5x/zIp3U6wOR+d2W8zqX44EDt75L0hz8m9fUcKk=; b=Rtn8uygK3fK4J6CBgPzp1BPeMqesxgHdiV+2uam6Z4Xup7qiedsBq1u1Gn3SO94opX YMIQbImR+8DfqHcCE1XGVxWJM18wXVEudaGrF/9ZmTWxGccdUp1TdFMejmE9arUhtiL9 kFRjAWDYXG728PvxLpFm1c17xLsWttQRS9CDD2MB3dtDXwvxQ3DY5yU1YSKHM9xeb77i khiPftwEA7c9UfP8qCY9KuFnGgi/R3bDAFm5r9/UvqIaeHTIXrbZiskjLISBMka/rKcC 8y+poZI2I24jdeuYSOFGh3PrI8oH4T8L8LPCYXHWCR5LenGP+cgppkl8binEKEplStz7 xvyw== X-Received: by 10.112.23.34 with SMTP id j2mr983712lbf.118.1358358502201; Wed, 16 Jan 2013 09:48:22 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.30.131 with HTTP; Wed, 16 Jan 2013 09:47:52 -0800 (PST) In-Reply-To: References: <201301160503.r0G53qie087155@svn.freebsd.org> From: Eitan Adler Date: Wed, 16 Jan 2013 12:47:52 -0500 X-Google-Sender-Auth: nZcsX6vBtiXI6dGkt3yM4KjVrpk Message-ID: Subject: Re: svn commit: r245494 - head/bin/pwait To: Xin LI Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQlHA5jl8E0arEEjqEULq0catJXnZRt6fzDjTgkp/M5FdETqTxaL3r59VLeEEHCbk7sASFP1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2013 17:48:24 -0000 On 16 January 2013 01:49, Xin LI wrote: > This doesn't seem right -- you should never release memory before exit, > especially for memory allocated in main(), unless this "main" is intended > for different purpose like a monolithic shell that wants to avoid exec(). > Note that pwait(1) have multiple exit points I don't think it's practical. ... There have been multiple conversations about this: on hackers, on the commit lists, and on the clang analyzer lists. I don't care much how the final code looks: with either free or return but please make sure that scan-build finds no warnings. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams