Free buffer on error in a2i_ASN1_INTEGER()
[openssl.git] / crypto / asn1 / f_int.c
index 15aece99e8863620f8d1dee43aa3dcc0c4014e2b..0f16ac0bbbddc842bed08d196237a32b6da6da90 100644 (file)
@@ -148,6 +148,7 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
     return 1;
  err:
     ASN1err(ASN1_F_A2I_ASN1_INTEGER, ASN1_R_SHORT_LINE);
+    OPENSSL_free(s);
     return 0;
 }