mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix resource leak, variable fd going out of scope.
Reported by: Coverity CID: 1204383 Sponsored by: iXsystems Inc.
This commit is contained in:
parent
ea2c655dd9
commit
6c8dae3cba
1 changed files with 1 additions and 0 deletions
|
|
@ -168,6 +168,7 @@ pci_vtrnd_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts)
|
|||
len = read(fd, &v, sizeof(v));
|
||||
if (len <= 0) {
|
||||
WPRINTF(("vtrnd: /dev/random not ready, read(): %d", len));
|
||||
close(fd);
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue