diff options
author | David Benjamin <davidben@google.com> | 2016-03-09 00:04:50 +0300 |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2016-03-09 00:08:48 +0300 |
commit | 3d38c03a8e2011e1d2801c389fc481c8ba9841d6 (patch) | |
tree | ee87510b76d2354a0d92d2ce1665194a4d1349a9 /crypto/dsa | |
parent | f945952d5779bf7e2b38297cad29d1efb61f5911 (diff) |
Fix a few more missing CBB_cleanups.
See also 1b0c438e1a0e570de18ecc7aabda3be8dea4cfa0.
Change-Id: Ifcfe15caa4d0db8ef725f8dacd0e8c5c94b00a09
Reviewed-on: https://boringssl-review.googlesource.com/7390
Reviewed-by: Emily Stark (Dunn) <estark@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'crypto/dsa')
-rw-r--r-- | crypto/dsa/dsa_asn1.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/dsa/dsa_asn1.c b/crypto/dsa/dsa_asn1.c index 7615fca2..ff5ee003 100644 --- a/crypto/dsa/dsa_asn1.c +++ b/crypto/dsa/dsa_asn1.c @@ -248,6 +248,7 @@ int i2d_DSA_SIG(const DSA_SIG *in, uint8_t **outp) { CBB cbb; if (!CBB_init(&cbb, 0) || !DSA_SIG_marshal(&cbb, in)) { + CBB_cleanup(&cbb); return -1; } return CBB_finish_i2d(&cbb, outp); @@ -275,6 +276,7 @@ int i2d_DSAPublicKey(const DSA *in, uint8_t **outp) { CBB cbb; if (!CBB_init(&cbb, 0) || !DSA_marshal_public_key(&cbb, in)) { + CBB_cleanup(&cbb); return -1; } return CBB_finish_i2d(&cbb, outp); @@ -302,6 +304,7 @@ int i2d_DSAPrivateKey(const DSA *in, uint8_t **outp) { CBB cbb; if (!CBB_init(&cbb, 0) || !DSA_marshal_private_key(&cbb, in)) { + CBB_cleanup(&cbb); return -1; } return CBB_finish_i2d(&cbb, outp); @@ -329,6 +332,7 @@ int i2d_DSAparams(const DSA *in, uint8_t **outp) { CBB cbb; if (!CBB_init(&cbb, 0) || !DSA_marshal_parameters(&cbb, in)) { + CBB_cleanup(&cbb); return -1; } return CBB_finish_i2d(&cbb, outp); |