Don't leak on an OPENSSL_realloc() failure
authorMatt Caswell <matt@openssl.org>
Wed, 21 Sep 2016 14:49:28 +0000 (15:49 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 21 Sep 2016 19:30:25 +0000 (20:30 +0100)
commit1fdeda4cc994845998c9f017d300e6aecc7b5128
treee399b65fe3f6cec795d5e2b0a05cf2321654a147
parent6915f39e68f02ad08a635516d46e72bbf0379914
Don't leak on an OPENSSL_realloc() failure

If OPENSSL_sk_insert() calls OPENSSL_realloc() and it fails, it was leaking
the originally allocated memory.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 41bff723c6784cc846054a4fd4add6dbec8c2c64)
crypto/stack/stack.c