emulator: Fix leaking file descriptor

This commit is contained in:
Marcel Holtmann 2014-12-14 13:53:51 +01:00
parent 8779f3db6c
commit f58086c23f

View File

@ -68,6 +68,9 @@ static bool get_random_bytes(void *buf, size_t num_bytes)
return false;
len = read(fd, buf, num_bytes);
close(fd);
if (len < 0)
return false;