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
@ -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…
x
Reference in New Issue
Block a user