From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:27:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2905BEA9; Thu, 25 Oct 2012 03:27:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D5B58FC0A; Thu, 25 Oct 2012 03:27:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9P3Rrvh061473; Thu, 25 Oct 2012 03:27:53 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3RrBK061470; Thu, 25 Oct 2012 03:27:53 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250327.q9P3RrBK061470@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:27:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242052 - stable/8/games/random X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Thu, 25 Oct 2012 03:27:54 -0000 Author: eadler Date: Thu Oct 25 03:27:53 2012 New Revision: 242052 URL: http://svn.freebsd.org/changeset/base/242052 Log: MFC r241847: Free buf when its no longer used. This helps eliminate a static analysis warning. PR: ports/172566 Approved by: cperciva (implicit) Modified: stable/8/games/random/randomize_fd.c Directory Properties: stable/8/games/random/ (props changed) Modified: stable/8/games/random/randomize_fd.c ============================================================================== --- stable/8/games/random/randomize_fd.c Thu Oct 25 03:24:24 2012 (r242051) +++ stable/8/games/random/randomize_fd.c Thu Oct 25 03:27:53 2012 (r242052) @@ -207,6 +207,8 @@ randomize_fd(int fd, int type, int uniqu goto make_token; } + free(buf); + for (i = numnode; i > 0; i--) { selected = random() % numnode;