Fix a possible memleak
authorRichard Levitte <levitte@openssl.org>
Fri, 18 Dec 2015 12:03:45 +0000 (13:03 +0100)
committerRichard Levitte <levitte@openssl.org>
Sat, 2 Jan 2016 19:39:24 +0000 (20:39 +0100)
commit6aa0ba4bb2833b1e0d6ae98c54c79bfed8257c3a
tree05e7d8bc8448da1a1f83a0e37761a06f171a7de3
parent4fa52141b08fca89250805afcf2f112a2e0d3500
Fix a possible memleak

If there's a failure allocating md_data, the destination pctx will have
a shared pointer with the source EVP_MD_CTX, which will lead to problems
when either the source or the destination is freed.

Reviewed-by: Stephen Henson <steve@openssl.org>
crypto/evp/digest.c