mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-27 14:14:32 +08:00
emulator: Fix leaking file descriptor
This commit is contained in:
parent
8779f3db6c
commit
f58086c23f
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user