diff options
author | 2004-04-08 08:03:11 +0000 | |
---|---|---|
committer | 2004-04-08 08:03:11 +0000 | |
commit | 6278d0304dd1b39e46a509fa3953ad2d0b67fb9d (patch) | |
tree | dbc442beb7920ec3d30578fe90f92fb8264f34e9 /lib/libcrypto/engine/hw_cryptodev.c | |
parent | -l can overwrite the path to the leases file, noticed by millert (diff) | |
download | wireguard-openbsd-6278d0304dd1b39e46a509fa3953ad2d0b67fb9d.tar.xz wireguard-openbsd-6278d0304dd1b39e46a509fa3953ad2d0b67fb9d.zip |
merge 0.9.7d
Diffstat (limited to 'lib/libcrypto/engine/hw_cryptodev.c')
-rw-r--r-- | lib/libcrypto/engine/hw_cryptodev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libcrypto/engine/hw_cryptodev.c b/lib/libcrypto/engine/hw_cryptodev.c index 2fe84a50029..21de0a9fdd0 100644 --- a/lib/libcrypto/engine/hw_cryptodev.c +++ b/lib/libcrypto/engine/hw_cryptodev.c @@ -1257,14 +1257,17 @@ ENGINE_load_cryptodev(void) if (engine == NULL) return; - if ((fd = get_dev_crypto()) < 0) + if ((fd = get_dev_crypto()) < 0) { + ENGINE_free(engine); return; + } /* * find out what asymmetric crypto algorithms we support */ if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) { close(fd); + ENGINE_free(engine); return; } close(fd); |