diff options
| author | deraadt <> | 2006-06-08 00:16:44 +0000 |
|---|---|---|
| committer | deraadt <> | 2006-06-08 00:16:44 +0000 |
| commit | d945e56864331387464e225d737b6d9157e0e62d (patch) | |
| tree | f33d833e1b96b531163bcf915301cc8e389b72c9 /src/lib/libcrypto/engine/hw_cryptodev.c | |
| parent | fde88861f7c7717115785c496a4ed82b53b2202a (diff) | |
| download | openbsd-d945e56864331387464e225d737b6d9157e0e62d.tar.gz openbsd-d945e56864331387464e225d737b6d9157e0e62d.tar.bz2 openbsd-d945e56864331387464e225d737b6d9157e0e62d.zip | |
potential fd leak (we will fix this before we move to cloning)
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) { |
