summaryrefslogtreecommitdiffstats
path: root/crypto/ex_data.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-02-08 14:14:05 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-02-09 13:53:36 +0100
commit9c7a780bbebc1b6d87dc38a6aa3339033911a8bb (patch)
treec16fb6c8590b840de7221f83fa4a61b32edaffd6 /crypto/ex_data.c
parentRemove obsolete IMPLEMENT_ASN1_SET_OF (diff)
downloadopenssl-9c7a780bbebc1b6d87dc38a6aa3339033911a8bb.tar.xz
openssl-9c7a780bbebc1b6d87dc38a6aa3339033911a8bb.zip
Fix memory leak reporting.
Free up bio_err after memory leak data has been printed to it. In int_free_ex_data if ex_data is NULL there is nothing to free up so return immediately and don't reallocate it. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/ex_data.c')
-rw-r--r--crypto/ex_data.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/ex_data.c b/crypto/ex_data.c
index 4caddcebb4..d55985ba0a 100644
--- a/crypto/ex_data.c
+++ b/crypto/ex_data.c
@@ -500,6 +500,8 @@ static void int_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad)
EX_CLASS_ITEM *item;
void *ptr;
CRYPTO_EX_DATA_FUNCS **storage = NULL;
+ if (ex_data == NULL)
+ return;
if ((item = def_get_class(class_index)) == NULL)
return;
CRYPTO_r_lock(CRYPTO_LOCK_EX_DATA);