svn commit: r242054 - stable/7/games/random
Eitan Adler
eadler at FreeBSD.org
Thu Oct 25 03:27:54 UTC 2012
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);
More information about the svn-src-all
mailing list