diff options
Diffstat (limited to 'src/lib/libcrypto/engine/hw_cryptodev.c')
| -rw-r--r-- | src/lib/libcrypto/engine/hw_cryptodev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/engine/hw_cryptodev.c b/src/lib/libcrypto/engine/hw_cryptodev.c index 924e379ab5..d3b186c132 100644 --- a/src/lib/libcrypto/engine/hw_cryptodev.c +++ b/src/lib/libcrypto/engine/hw_cryptodev.c | |||
| @@ -193,8 +193,10 @@ get_dev_crypto(void) | |||
| 193 | 193 | ||
| 194 | if ((fd = open_dev_crypto()) == -1) | 194 | if ((fd = open_dev_crypto()) == -1) |
| 195 | return (-1); | 195 | return (-1); |
| 196 | if (ioctl(fd, CRIOGET, &retfd) == -1) | 196 | if (ioctl(fd, CRIOGET, &retfd) == -1) { |
| 197 | close(fd); | ||
| 197 | return (-1); | 198 | return (-1); |
| 199 | } | ||
| 198 | 200 | ||
| 199 | /* close on exec */ | 201 | /* close on exec */ |
| 200 | if (fcntl(retfd, F_SETFD, 1) == -1) { | 202 | if (fcntl(retfd, F_SETFD, 1) == -1) { |
