Skip to content

Commit

Permalink
Close /dev/crypto file descriptor after CRIOGET ioctl().
Browse files Browse the repository at this point in the history
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from openssl#13807)
  • Loading branch information
bsdjhb authored and kaduk committed Jan 11, 2021
1 parent 678cae0 commit 3ddf44e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engines/e_devcrypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3ddf44e

Please sign in to comment.