config: fix possible leak in use_cert_chain