]> granicus.if.org Git - openssl/commit
Free up passed ASN.1 structure if reused.
authorDr. Stephen Henson <steve@openssl.org>
Mon, 23 Feb 2015 12:57:50 +0000 (12:57 +0000)
committerRichard Levitte <richard@levitte.org>
Wed, 2 Dec 2015 20:40:11 +0000 (21:40 +0100)
commitd275dbe6eb7b720b8920f712eea79044f845a4bb
tree8286eb1dfef1dcca002526089f26bfde06b182ae
parentcf432b3b1bd7caa22943b41b94ec2472ae497dc6
Free up passed ASN.1 structure if reused.

Change the "reuse" behaviour in ASN1_item_d2i: if successful the old
structure is freed and a pointer to the new one used. If it is not
successful then the passed structure is untouched.

Exception made for primitive types so ssl_asn1.c still works.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Conflicts:
doc/crypto/d2i_X509.pod
crypto/asn1/tasn_dec.c
doc/crypto/d2i_X509.pod