From 7c5b097a5308ecc3d26a742367e19302f34fa3a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 18 Jun 2007 21:24:19 +0000 Subject: [PATCH] Avoid useing freed memory. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21140 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/keyset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/hx509/keyset.c b/lib/hx509/keyset.c index a8c68596b..d383558f6 100644 --- a/lib/hx509/keyset.c +++ b/lib/hx509/keyset.c @@ -100,12 +100,13 @@ hx509_certs_init(hx509_context context, } ops = _hx509_ks_type(context, type); - free(type); if (ops == NULL) { hx509_set_error_string(context, 0, ENOENT, "Keyset type %s is not supported", type); + free(type); return ENOENT; } + free(type); c = calloc(1, sizeof(*c)); if (c == NULL) { hx509_clear_error_string(context);