From: jsg Date: Fri, 18 Apr 2014 11:14:35 +0000 (+0000) Subject: add braces missed when fixing leaks X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a1abcbe96b9649e57be4fabed61496f48a4453fb;p=openbsd add braces missed when fixing leaks --- 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 */