From f4600fe0a52b28fcba088f038fa8e142f2557485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 4 Jun 2007 23:03:10 +0000 Subject: [PATCH] Leak less memory, use functions that does same but more. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20894 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/print.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/hx509/print.c b/lib/hx509/print.c index c163c7a9b..8c2eaa782 100644 --- a/lib/hx509/print.c +++ b/lib/hx509/print.c @@ -422,6 +422,7 @@ check_CRLDistributionPoints(hx509_validate_ctx ctx, free_DistributionPointName(&dpname); } } + free_CRLDistributionPoints(&dp); return 0; } @@ -673,6 +674,7 @@ hx509_validate_cert(hx509_context context, hx509_name issuer, subject; char *str; struct cert_status status; + int ret; memset(&status, 0, sizeof(status)); @@ -688,13 +690,15 @@ hx509_validate_cert(hx509_context context, validate_print(ctx, HX509_VALIDATE_F_VALIDATE, "Version 3 certificate without extensions\n"); - _hx509_name_from_Name(&t->subject, &subject); + ret = hx509_cert_get_subject(cert, &subject); + if (ret) abort(); hx509_name_to_string(subject, &str); validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "subject name: %s\n", str); free(str); - _hx509_name_from_Name(&t->issuer, &issuer); + ret = hx509_cert_get_issuer(cert, &issuer); + if (ret) abort(); hx509_name_to_string(issuer, &str); validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "issuer name: %s\n", str);