From 99b5369cf2d45100d1c69d68be0f38212b08a6af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sat, 21 Oct 2006 19:35:30 +0000 Subject: [PATCH] Try to not leak memory (again). git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18779 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/cms.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/hx509/cms.c b/lib/hx509/cms.c index 1ec6af78b..5d3e0778a 100644 --- a/lib/hx509/cms.c +++ b/lib/hx509/cms.c @@ -664,9 +664,6 @@ hx509_cms_verify_signed(hx509_context context, goto out; } - hx509_clear_error_string(context); - - ret = HX509_CMS_SIGNER_NOT_FOUND; for (found_valid_sig = 0, i = 0; i < sd.signerInfos.len; i++) { heim_octet_string *signed_data; const heim_oid *match_oid; @@ -832,7 +829,12 @@ hx509_cms_verify_signed(hx509_context context, cert = NULL; } if (found_valid_sig == 0) { - return ret; + if (ret == 0) { + ret = HX509_CMS_SIGNER_NOT_FOUND; + hx509_set_error_string(context, 0, ret, + "No signers where found"); + } + goto out; } ret = der_copy_oid(&sd.encapContentInfo.eContentType, contentType);