summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/hx509/revoke.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/lib/hx509/revoke.c')
-rw-r--r--source4/heimdal/lib/hx509/revoke.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/heimdal/lib/hx509/revoke.c b/source4/heimdal/lib/hx509/revoke.c
index 8325c4723d..a36ec964d2 100644
--- a/source4/heimdal/lib/hx509/revoke.c
+++ b/source4/heimdal/lib/hx509/revoke.c
@@ -50,7 +50,7 @@
*/
#include "hx_locl.h"
-RCSID("$Id: revoke.c 23413 2008-07-26 18:34:53Z lha $");
+RCSID("$Id$");
struct revoke_crl {
char *path;
@@ -1515,10 +1515,13 @@ hx509_crl_sign(hx509_context context,
&c.signatureAlgorithm,
&c.signatureValue);
free(os->data);
+ if (ret) {
+ hx509_set_error_string(context, 0, ret, "Failed to sign CRL");
+ goto out;
+ }
ASN1_MALLOC_ENCODE(CRLCertificateList, os->data, os->length,
&c, &size, ret);
- free_CRLCertificateList(&c);
if (ret) {
hx509_set_error_string(context, 0, ret, "failed to encode CRL");
goto out;
@@ -1526,6 +1529,8 @@ hx509_crl_sign(hx509_context context,
if (size != os->length)
_hx509_abort("internal ASN.1 encoder error");
+ free_CRLCertificateList(&c);
+
return 0;
out: