summaryrefslogtreecommitdiff
path: root/crypto/ex_data.c
diff options
context:
space:
mode:
authorRalf S. Engelschall <rse@openssl.org>1998-12-21 11:00:56 +0000
committerRalf S. Engelschall <rse@openssl.org>1998-12-21 11:00:56 +0000
commitdfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c (patch)
tree2f74e0cfd76a9e092548a9bf52e579aef984299b /crypto/ex_data.c
parent58964a492275ca9a59a0cd9c8155cb2491b4b909 (diff)
downloadopenssl-new-dfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c.tar.gz
Import of old SSLeay release: SSLeay 0.9.1b (unreleased)SSLeay
Diffstat (limited to 'crypto/ex_data.c')
-rw-r--r--crypto/ex_data.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/ex_data.c b/crypto/ex_data.c
index c858b518ff..42b8b9d1ba 100644
--- a/crypto/ex_data.c
+++ b/crypto/ex_data.c
@@ -72,20 +72,22 @@ int (*new_func)();
int (*dup_func)();
void (*free_func)();
{
+ int ret= -1;
CRYPTO_EX_DATA_FUNCS *a;
+ MemCheck_off();
if (*skp == NULL)
*skp=sk_new_null();
if (*skp == NULL)
{
CRYPTOerr(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX,ERR_R_MALLOC_FAILURE);
- return(-1);
+ goto err;
}
a=(CRYPTO_EX_DATA_FUNCS *)Malloc(sizeof(CRYPTO_EX_DATA_FUNCS));
if (a == NULL)
{
CRYPTOerr(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX,ERR_R_MALLOC_FAILURE);
- return(-1);
+ goto err;
}
a->argl=argl;
a->argp=argp;
@@ -98,10 +100,13 @@ void (*free_func)();
{
CRYPTOerr(CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX,ERR_R_MALLOC_FAILURE);
Free(a);
- return(-1);
+ goto err;
}
}
sk_value(*skp,idx)=(char *)a;
+ ret=idx;
+err:
+ MemCheck_on();
return(idx);
}