mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-04 21:49:38 +00:00
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)
This commit is contained in:
parent
678cae0295
commit
3ddf44ea5a
@ -1236,9 +1236,11 @@ static int open_devcrypto(void)
|
|||||||
#ifdef CRIOGET
|
#ifdef CRIOGET
|
||||||
if (ioctl(fd, CRIOGET, &cfd) < 0) {
|
if (ioctl(fd, CRIOGET, &cfd) < 0) {
|
||||||
fprintf(stderr, "Could not create crypto fd: %s\n", strerror(errno));
|
fprintf(stderr, "Could not create crypto fd: %s\n", strerror(errno));
|
||||||
|
close(fd);
|
||||||
cfd = -1;
|
cfd = -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
close(fd);
|
||||||
#else
|
#else
|
||||||
cfd = fd;
|
cfd = fd;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user