Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Oct 2012 03:06:59 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241847 - head/games/random
Message-ID:  <201210220306.q9M36xR5017770@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Mon Oct 22 03:06:59 2012
New Revision: 241847
URL: http://svn.freebsd.org/changeset/base/241847

Log:
  Free buf when its no longer used. This helps eliminate a static analysis
  warning.
  
  PR:		ports/172566
  Submitted by:	Erik Cederstrand <erik@cederstrand.dk>
  Approved by:	cperciva
  MFC after:	3 days

Modified:
  head/games/random/randomize_fd.c

Modified: head/games/random/randomize_fd.c
==============================================================================
--- head/games/random/randomize_fd.c	Mon Oct 22 03:06:53 2012	(r241846)
+++ head/games/random/randomize_fd.c	Mon Oct 22 03:06:59 2012	(r241847)
@@ -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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210220306.q9M36xR5017770>