add braces missed when fixing leaks
authorjsg <jsg@openbsd.org>
Fri, 18 Apr 2014 11:14:35 +0000 (11:14 +0000)
committerjsg <jsg@openbsd.org>
Fri, 18 Apr 2014 11:14:35 +0000 (11:14 +0000)
lib/libcrypto/asn1/tasn_enc.c
lib/libssl/src/crypto/asn1/tasn_enc.c

index f7bdd11..c9131cd 100644 (file)
@@ -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 */
index f7bdd11..c9131cd 100644 (file)
@@ -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 */