Fix memory leaks in X509 certificate parsing/verification.