summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/engine/hw_cryptodev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/engine/hw_cryptodev.c')
-rw-r--r--src/lib/libcrypto/engine/hw_cryptodev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/engine/hw_cryptodev.c b/src/lib/libcrypto/engine/hw_cryptodev.c
index 2fe84a5002..21de0a9fdd 100644
--- a/src/lib/libcrypto/engine/hw_cryptodev.c
+++ b/src/lib/libcrypto/engine/hw_cryptodev.c
@@ -1257,14 +1257,17 @@ ENGINE_load_cryptodev(void)
1257 1257
1258 if (engine == NULL) 1258 if (engine == NULL)
1259 return; 1259 return;
1260 if ((fd = get_dev_crypto()) < 0) 1260 if ((fd = get_dev_crypto()) < 0) {
1261 ENGINE_free(engine);
1261 return; 1262 return;
1263 }
1262 1264
1263 /* 1265 /*
1264 * find out what asymmetric crypto algorithms we support 1266 * find out what asymmetric crypto algorithms we support
1265 */ 1267 */
1266 if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) { 1268 if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) {
1267 close(fd); 1269 close(fd);
1270 ENGINE_free(engine);
1268 return; 1271 return;
1269 } 1272 }
1270 close(fd); 1273 close(fd);