projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28474e2
)
Free "engine" resource in case of failure to prevent memory leak
author
Lutz Jänicke
<jaenicke@openssl.org>
Mon, 24 Nov 2003 16:47:44 +0000
(16:47 +0000)
committer
Lutz Jänicke
<jaenicke@openssl.org>
Mon, 24 Nov 2003 16:47:44 +0000
(16:47 +0000)
PR: #778
Submitted by: George Mitchell <george@m5p.com>
crypto/engine/hw_cryptodev.c
patch
|
blob
|
history
diff --git
a/crypto/engine/hw_cryptodev.c
b/crypto/engine/hw_cryptodev.c
index 40af97ac248b3f504b2bf99d4b3d4c3394dbab4d..19b313ff816c252642899931593962e4bab43866 100644
(file)
--- a/
crypto/engine/hw_cryptodev.c
+++ b/
crypto/engine/hw_cryptodev.c
@@
-1054,14
+1054,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);