svn commit: r241847 - head/games/random
Eitan Adler
eadler at FreeBSD.org
Mon Oct 22 03:06:59 UTC 2012
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 at 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;
More information about the svn-src-head
mailing list