diff options
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/asn1/tasn_enc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libcrypto/asn1/tasn_enc.c b/lib/libcrypto/asn1/tasn_enc.c index f7bdd11edfa..c9131cd9ca2 100644 --- a/lib/libcrypto/asn1/tasn_enc.c +++ b/lib/libcrypto/asn1/tasn_enc.c @@ -433,10 +433,11 @@ static int asn1_set_seq_out(STACK_OF(ASN1_VALUE) *sk, unsigned char **out, derlst = malloc(sk_ASN1_VALUE_num(sk) * sizeof(*derlst)); tmpdat = malloc(skcontlen); - if (!derlst || !tmpdat) + if (!derlst || !tmpdat) { free(derlst); free(tmpdat); return 0; + } } } /* If not sorting just output each item */ |