From 6e2407cfb9a25fe5aa16aa4156b12afdc4082d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Thu, 7 Sep 2006 09:11:30 +0000 Subject: [PATCH] (find_CMSIdentifier): only free string when we allocated one. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18048 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/cms.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/hx509/cms.c b/lib/hx509/cms.c index 3fa913070..ed1db4f6e 100644 --- a/lib/hx509/cms.c +++ b/lib/hx509/cms.c @@ -205,12 +205,13 @@ find_CMSIdentifier(hx509_context context, len = hex_encode(ki->data, ki->length, &str); if (len < 0) hx509_clear_error_string(context); - else + else { hx509_set_error_string(context, 0, HX509_CMS_NO_RECIPIENT_CERTIFICATE, "Failed to find cert with id: %s", str); - free(str); + free(str); + } return HX509_CMS_NO_RECIPIENT_CERTIFICATE; }