diff options
author | mrpre <mrpre@163.com> | 2015-09-01 20:42:06 +0800 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-01-23 13:48:10 -0500 |
commit | 33a23fa6afe355304e02b7abb96acdbc5fc6c5c2 (patch) | |
tree | 6c119b187e0fd3d2dd3c98890768e797a44eb49f /crypto/asn1 | |
parent | b427401cb68ff06f56d43a04b998d401945f3628 (diff) |
free item after sk_push fail
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/tasn_dec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c index 595c5e4cb1..0e0759f54b 100644 --- a/crypto/asn1/tasn_dec.c +++ b/crypto/asn1/tasn_dec.c @@ -623,6 +623,7 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val, len -= p - q; if (!sk_ASN1_VALUE_push((STACK_OF(ASN1_VALUE) *)*val, skfield)) { ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I, ERR_R_MALLOC_FAILURE); + ASN1_item_free(skfield, ASN1_ITEM_ptr(tt->item)); goto err; } } |