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
This commit is contained in:
Eitan Adler 2012-10-22 03:06:59 +00:00
parent d1ea2c6674
commit c969ca9408

View File

@ -207,6 +207,8 @@ randomize_fd(int fd, int type, int unique, double denom)
goto make_token; goto make_token;
} }
free(buf);
for (i = numnode; i > 0; i--) { for (i = numnode; i > 0; i--) {
selected = random() % numnode; selected = random() % numnode;