aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/stack/stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/stack/stack.c')
-rw-r--r--crypto/stack/stack.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/crypto/stack/stack.c b/crypto/stack/stack.c
index 0ef62d623f..7e1c24515c 100644
--- a/crypto/stack/stack.c
+++ b/crypto/stack/stack.c
@@ -75,7 +75,6 @@ OPENSSL_STACK *OPENSSL_sk_dup(const OPENSSL_STACK *sk)
return ret;
err:
- ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE);
OPENSSL_sk_free(ret);
return NULL;
}
@@ -124,7 +123,6 @@ OPENSSL_STACK *OPENSSL_sk_deep_copy(const OPENSSL_STACK *sk,
return ret;
err:
- ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE);
OPENSSL_sk_free(ret);
return NULL;
}
@@ -198,10 +196,8 @@ static int sk_reserve(OPENSSL_STACK *st, int n, int exact)
* At this point, |st->num_alloc| and |st->num| are 0;
* so |num_alloc| value is |n| or |min_nodes| if greater than |n|.
*/
- if ((st->data = OPENSSL_zalloc(sizeof(void *) * num_alloc)) == NULL) {
- ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE);
+ if ((st->data = OPENSSL_zalloc(sizeof(void *) * num_alloc)) == NULL)
return 0;
- }
st->num_alloc = num_alloc;
return 1;
}
@@ -219,10 +215,8 @@ static int sk_reserve(OPENSSL_STACK *st, int n, int exact)
}
tmpdata = OPENSSL_realloc((void *)st->data, sizeof(void *) * num_alloc);
- if (tmpdata == NULL) {
- ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE);
+ if (tmpdata == NULL)
return 0;
- }
st->data = tmpdata;
st->num_alloc = num_alloc;
@@ -233,10 +227,8 @@ OPENSSL_STACK *OPENSSL_sk_new_reserve(OPENSSL_sk_compfunc c, int n)
{
OPENSSL_STACK *st = OPENSSL_zalloc(sizeof(OPENSSL_STACK));
- if (st == NULL) {
- ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE);
+ if (st == NULL)
return NULL;
- }
st->comp = c;