Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Oct 2012 03:27:54 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r242054 - stable/7/games/random
Message-ID:  <201210250327.q9P3RsdI061498@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Thu Oct 25 03:27:53 2012
New Revision: 242054
URL: http://svn.freebsd.org/changeset/base/242054

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/7/games/random/randomize_fd.c
Directory Properties:
  stable/7/games/random/   (props changed)

Modified: stable/7/games/random/randomize_fd.c
==============================================================================
--- stable/7/games/random/randomize_fd.c	Thu Oct 25 03:27:53 2012	(r242053)
+++ stable/7/games/random/randomize_fd.c	Thu Oct 25 03:27:53 2012	(r242054)
@@ -201,6 +201,8 @@ randomize_fd(int fd, int type, int uniqu
 		goto make_token;
 	}
 
+	free(buf);
+
 	for (i = numnode; i > 0; i--) {
 		selected = ((int)denom * random())/(((double)RAND_MAX + 1) / numnode);
 



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