do_body: fix heap-use-after-free.
authorPavel Kopyl <p.kopyl@samsung.com>
Fri, 3 Nov 2017 19:18:35 +0000 (22:18 +0300)
committerMatt Caswell <matt@openssl.org>
Wed, 21 Feb 2018 12:22:59 +0000 (12:22 +0000)
commita9603be1a8484fc17cbcb0f4df953a4c6f37ffa1
tree15bd32a9435716f492e775e01d820cfe3d1d511f
parent2d4def005263614d23b9dcbf98f48c145ea1b0cf
do_body: fix heap-use-after-free.

The memory pointed to by the 'push' is freed by the
X509_NAME_ENTRY_free() in do_body(). The second time
it is referenced to (indirectly) in certify_cert:X509_REQ_free().

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4698)
apps/ca.c