diff options
author | John Baldwin <jhb@FreeBSD.org> | 2021-01-07 23:09:41 +0100 |
---|---|---|
committer | Benjamin Kaduk <kaduk@mit.edu> | 2021-01-11 23:10:36 +0100 |
commit | 3ddf44ea5a2c1c8c55f4f4072a611791c79d4e7c (patch) | |
tree | 367ce187097c89aa3bb4d305785311ffcd6863a2 /engines/e_devcrypto.c | |
parent | APPS: Print help also on -h and --h; print high-level help when no cmd given (diff) | |
download | openssl-3ddf44ea5a2c1c8c55f4f4072a611791c79d4e7c.tar.xz openssl-3ddf44ea5a2c1c8c55f4f4072a611791c79d4e7c.zip |
Close /dev/crypto file descriptor after CRIOGET ioctl().
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/13807)
Diffstat (limited to 'engines/e_devcrypto.c')
-rw-r--r-- | engines/e_devcrypto.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c index d549edfd29..e1c4372f72 100644 --- a/engines/e_devcrypto.c +++ b/engines/e_devcrypto.c @@ -1236,9 +1236,11 @@ static int open_devcrypto(void) #ifdef CRIOGET if (ioctl(fd, CRIOGET, &cfd) < 0) { fprintf(stderr, "Could not create crypto fd: %s\n", strerror(errno)); + close(fd); cfd = -1; return 0; } + close(fd); #else cfd = fd; #endif |