diff --git a/lib/hx509/cert.c b/lib/hx509/cert.c index 223ff655c..36d5fa378 100644 --- a/lib/hx509/cert.c +++ b/lib/hx509/cert.c @@ -229,6 +229,7 @@ hx509_cert_init(hx509_context context, const Certificate *c, hx509_cert *cert) if (ret) { free((*cert)->data); free(*cert); + *cert = NULL; } return ret; }