From c969ca9408ebdda12176a10520a73ea4f7a3c23c Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Mon, 22 Oct 2012 03:06:59 +0000 Subject: [PATCH] Free buf when its no longer used. This helps eliminate a static analysis warning. PR: ports/172566 Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days --- games/random/randomize_fd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/games/random/randomize_fd.c b/games/random/randomize_fd.c index da41769ffbb6..f66b9654d281 100644 --- a/games/random/randomize_fd.c +++ b/games/random/randomize_fd.c @@ -207,6 +207,8 @@ randomize_fd(int fd, int type, int unique, double denom) goto make_token; } + free(buf); + for (i = numnode; i > 0; i--) { selected = random() % numnode;