diff --git a/lib/hx509/hxtool.c b/lib/hx509/hxtool.c index a1c9de2c2..b6f347be2 100644 --- a/lib/hx509/hxtool.c +++ b/lib/hx509/hxtool.c @@ -721,7 +721,7 @@ verify_f(hx509_context hxcontext, void *ctx, hx509_cert c) if (ret) { char *s = hx509_get_error_string(hxcontext, ret); printf("verify_path: %s: %d\n", s, ret); - free(s); + hx509_free_error_string(s); v->errors++; } else printf("path ok\n"); @@ -1002,7 +1002,7 @@ verify_o(hx509_context hxcontext, void *ctx, hx509_cert c) if (ret) { char *s = hx509_get_error_string(hxcontext, ret); printf("ocsp_verify: %s: %d\n", s, ret); - free(s); + hx509_free_error_string(s); } else printf("expire: %d\n", (int)expiration);