From a1abcbe96b9649e57be4fabed61496f48a4453fb Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 18 Apr 2014 11:14:35 +0000 Subject: [PATCH] add braces missed when fixing leaks --- lib/libcrypto/asn1/tasn_enc.c | 3 ++- lib/libssl/src/crypto/asn1/tasn_enc.c | 3 ++- 2 files changed, 4 insertions(+), 2 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 */ diff --git a/lib/libssl/src/crypto/asn1/tasn_enc.c b/lib/libssl/src/crypto/asn1/tasn_enc.c index f7bdd11edfa..c9131cd9ca2 100644 --- a/lib/libssl/src/crypto/asn1/tasn_enc.c +++ b/lib/libssl/src/crypto/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 */ -- 2.20.1