summaryrefslogtreecommitdiffstats
path: root/crypto/objects/obj_dat.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/objects/obj_dat.c')
-rw-r--r--crypto/objects/obj_dat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c
index 3df5cdd97b..563556e1f8 100644
--- a/crypto/objects/obj_dat.c
+++ b/crypto/objects/obj_dat.c
@@ -420,7 +420,11 @@ int no_name;
/* Work out size of content octets */
i=a2d_ASN1_OBJECT(NULL,0,s,-1);
- if (i <= 0) return NULL;
+ if (i <= 0) {
+ /* Clear the error */
+ ERR_get_error();
+ return NULL;
+ }
/* Work out total size */
j = ASN1_object_size(0,i,V_ASN1_OBJECT);