Don't leak `fd` when manipulating the device via `_getdev()`
authorEnji Cooper <ngie@FreeBSD.org>
Wed, 24 Apr 2019 05:47:09 +0000 (05:47 +0000)
committerEnji Cooper <ngie@FreeBSD.org>
Wed, 24 Apr 2019 05:47:09 +0000 (05:47 +0000)
commit56bf253633cbce3e2dcba0a590b720219b98f8f9
tree9caf65b17865c05620e60fc439c97b027518acbe
parent8b82def341087b6512496f05f3aa3ca0ebc9b5a8
Don't leak `fd` when manipulating the device via `_getdev()`

Close the file descriptor when done calling ioctl with a try-finally block so
it doesn't get leaked.

MFC after: 2 months
tests/sys/opencrypto/cryptodev.py