From 40d673554117d24c9f46be721235d3e302c06e04 Mon Sep 17 00:00:00 2001 From: markus <> Date: Thu, 8 Apr 2004 08:03:15 +0000 Subject: merge 0.9.7d --- src/lib/libcrypto/engine/hw_cryptodev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/engine/hw_cryptodev.c') 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) 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); -- cgit v1.2.3-55-g6feb