From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 04:27:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62B8F8BA for ; Tue, 7 Apr 2015 04:27:04 +0000 (UTC) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E26A09DE for ; Tue, 7 Apr 2015 04:27:03 +0000 (UTC) Received: by wgin8 with SMTP id n8so43556037wgi.0 for ; Mon, 06 Apr 2015 21:27:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=3rWSVlrh6VgRjZtWv2JPixyGRTL65mYECVqYIqezU+I=; b=mLnMHtIa2OKB9YqhYMEuqCBeYnFYS6z1D7H8MQSBtMTPObeN0nLJeSzhG4jaDKzOPV AMU1wV4aTGp0UaiBW3N3yFCW36bfoXym8hCh4a9FiLGdkl/bjvnrzkt7zxvZUlpWIZFJ FYHGENmlC8ykZbG++ub5OioE7mMsluk9lBQx8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=3rWSVlrh6VgRjZtWv2JPixyGRTL65mYECVqYIqezU+I=; b=Nfg6HTJ3qEfWlPVuFeEKRCnLKRZn//60B0+dH/u8KbDB6L1R+sINBd0A8iM6fKYOXU XRukTOXCaJUFwzGWYci9uODM46NqF1SpIC9OsGCqXaI4sLSijQq4W5dXeNoEYIfQIsVV jYbyY2k/YP+YsLjU+iAUuCQgPF5NhHV1Hg08/jNpViLfChCtVYEIoBYXHEuMdTu0Pzkx hMwDT7aL8uDVoGAUVIjlRHP3GssV7+fWpIc0FRJm7dBb6hYPI5kwEmwMKqUT3u25dbaf D9JmnDbqF7c8aVzEbTct99qOmkIbA3gtneo+U21d03B24/rCMaF02p5psLRswSord64K 8LOg== X-Gm-Message-State: ALoCoQlIGOgGECABsTZDE6RSPp4c8IH8nXuswan9RE58obprwFI3BFBb7YEWlaR3NY2IGTnlYryK X-Received: by 10.180.98.98 with SMTP id eh2mr876062wib.31.1428380822071; Mon, 06 Apr 2015 21:27:02 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Mon, 6 Apr 2015 21:26:31 -0700 (PDT) In-Reply-To: <201504070117.t371HTlS083981@svn.freebsd.org> References: <201504070117.t371HTlS083981@svn.freebsd.org> From: Eitan Adler Date: Tue, 7 Apr 2015 00:26:31 -0400 X-Google-Sender-Auth: SYgcWaK25KIJ2RNCC429FbFTDAM Message-ID: Subject: Re: svn commit: r281181 - head/usr.bin/sort To: "Pedro F. Giffuni" Content-Type: text/plain; charset=UTF-8 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.18-1 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: Tue, 07 Apr 2015 04:27:04 -0000 On 6 April 2015 at 21:17, Pedro F. Giffuni wrote: > Author: pfg > Date: Tue Apr 7 01:17:29 2015 > New Revision: 281181 > URL: https://svnweb.freebsd.org/changeset/base/281181 > > Log: > sort(1): Cleanups and a small memory leak. > > Remove useless check for leading blanks in the month name. The > code didn't adjust len after stripping blanks so even if a month > *did* start with a blank we'd end up copying garbage at the end. > Also convert a malloc + memcpy to strdup and fix a memory leak in > the wide char version if mbstowcs() fails. > Originally from Andre Smagin. > > Obtained from: OpenBSD (CVS rev. 1.2, 1.3) > MFC after: 1 week Thanks for porting all these cleanups! -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams