summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/asn1/f_enum.c11
-rw-r--r--src/lib/libcrypto/asn1/f_int.c11
-rw-r--r--src/lib/libcrypto/asn1/f_string.c11
-rw-r--r--src/lib/libssl/src/crypto/asn1/f_enum.c11
-rw-r--r--src/lib/libssl/src/crypto/asn1/f_int.c11
-rw-r--r--src/lib/libssl/src/crypto/asn1/f_string.c11
6 files changed, 24 insertions, 42 deletions
diff --git a/src/lib/libcrypto/asn1/f_enum.c b/src/lib/libcrypto/asn1/f_enum.c
index 98fa312266..5c42cdff01 100644
--- a/src/lib/libcrypto/asn1/f_enum.c
+++ b/src/lib/libcrypto/asn1/f_enum.c
@@ -158,8 +158,6 @@ a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size)
158 if (sp == NULL) { 158 if (sp == NULL) {
159 ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, 159 ASN1err(ASN1_F_A2I_ASN1_ENUMERATED,
160 ERR_R_MALLOC_FAILURE); 160 ERR_R_MALLOC_FAILURE);
161 if (s != NULL)
162 free(s);
163 goto err; 161 goto err;
164 } 162 }
165 s = sp; 163 s = sp;
@@ -191,12 +189,11 @@ a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size)
191 } 189 }
192 bs->length = num; 190 bs->length = num;
193 bs->data = s; 191 bs->data = s;
194 ret = 1; 192 return (1);
195 193
196err:
197 if (0) {
198err_sl: 194err_sl:
199 ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, ASN1_R_SHORT_LINE); 195 ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, ASN1_R_SHORT_LINE);
200 } 196err:
197 free(s);
201 return (ret); 198 return (ret);
202} 199}
diff --git a/src/lib/libcrypto/asn1/f_int.c b/src/lib/libcrypto/asn1/f_int.c
index 3f671d1c49..41e0e75226 100644
--- a/src/lib/libcrypto/asn1/f_int.c
+++ b/src/lib/libcrypto/asn1/f_int.c
@@ -162,8 +162,6 @@ a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
162 if (sp == NULL) { 162 if (sp == NULL) {
163 ASN1err(ASN1_F_A2I_ASN1_INTEGER, 163 ASN1err(ASN1_F_A2I_ASN1_INTEGER,
164 ERR_R_MALLOC_FAILURE); 164 ERR_R_MALLOC_FAILURE);
165 if (s != NULL)
166 free(s);
167 goto err; 165 goto err;
168 } 166 }
169 s = sp; 167 s = sp;
@@ -195,12 +193,11 @@ a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
195 } 193 }
196 bs->length = num; 194 bs->length = num;
197 bs->data = s; 195 bs->data = s;
198 ret = 1; 196 return (1);
199 197
200err:
201 if (0) {
202err_sl: 198err_sl:
203 ASN1err(ASN1_F_A2I_ASN1_INTEGER, ASN1_R_SHORT_LINE); 199 ASN1err(ASN1_F_A2I_ASN1_INTEGER, ASN1_R_SHORT_LINE);
204 } 200err:
201 free(s);
205 return (ret); 202 return (ret);
206} 203}
diff --git a/src/lib/libcrypto/asn1/f_string.c b/src/lib/libcrypto/asn1/f_string.c
index c213c7a88d..14f6554ab3 100644
--- a/src/lib/libcrypto/asn1/f_string.c
+++ b/src/lib/libcrypto/asn1/f_string.c
@@ -154,8 +154,6 @@ a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size)
154 if (sp == NULL) { 154 if (sp == NULL) {
155 ASN1err(ASN1_F_A2I_ASN1_STRING, 155 ASN1err(ASN1_F_A2I_ASN1_STRING,
156 ERR_R_MALLOC_FAILURE); 156 ERR_R_MALLOC_FAILURE);
157 if (s != NULL)
158 free(s);
159 goto err; 157 goto err;
160 } 158 }
161 s = sp; 159 s = sp;
@@ -187,12 +185,11 @@ a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size)
187 } 185 }
188 bs->length = num; 186 bs->length = num;
189 bs->data = s; 187 bs->data = s;
190 ret = 1; 188 return (1);
191 189
192err:
193 if (0) {
194err_sl: 190err_sl:
195 ASN1err(ASN1_F_A2I_ASN1_STRING, ASN1_R_SHORT_LINE); 191 ASN1err(ASN1_F_A2I_ASN1_STRING, ASN1_R_SHORT_LINE);
196 } 192err:
193 free(s);
197 return (ret); 194 return (ret);
198} 195}
diff --git a/src/lib/libssl/src/crypto/asn1/f_enum.c b/src/lib/libssl/src/crypto/asn1/f_enum.c
index 98fa312266..5c42cdff01 100644
--- a/src/lib/libssl/src/crypto/asn1/f_enum.c
+++ b/src/lib/libssl/src/crypto/asn1/f_enum.c
@@ -158,8 +158,6 @@ a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size)
158 if (sp == NULL) { 158 if (sp == NULL) {
159 ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, 159 ASN1err(ASN1_F_A2I_ASN1_ENUMERATED,
160 ERR_R_MALLOC_FAILURE); 160 ERR_R_MALLOC_FAILURE);
161 if (s != NULL)
162 free(s);
163 goto err; 161 goto err;
164 } 162 }
165 s = sp; 163 s = sp;
@@ -191,12 +189,11 @@ a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size)
191 } 189 }
192 bs->length = num; 190 bs->length = num;
193 bs->data = s; 191 bs->data = s;
194 ret = 1; 192 return (1);
195 193
196err:
197 if (0) {
198err_sl: 194err_sl:
199 ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, ASN1_R_SHORT_LINE); 195 ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, ASN1_R_SHORT_LINE);
200 } 196err:
197 free(s);
201 return (ret); 198 return (ret);
202} 199}
diff --git a/src/lib/libssl/src/crypto/asn1/f_int.c b/src/lib/libssl/src/crypto/asn1/f_int.c
index 3f671d1c49..41e0e75226 100644
--- a/src/lib/libssl/src/crypto/asn1/f_int.c
+++ b/src/lib/libssl/src/crypto/asn1/f_int.c
@@ -162,8 +162,6 @@ a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
162 if (sp == NULL) { 162 if (sp == NULL) {
163 ASN1err(ASN1_F_A2I_ASN1_INTEGER, 163 ASN1err(ASN1_F_A2I_ASN1_INTEGER,
164 ERR_R_MALLOC_FAILURE); 164 ERR_R_MALLOC_FAILURE);
165 if (s != NULL)
166 free(s);
167 goto err; 165 goto err;
168 } 166 }
169 s = sp; 167 s = sp;
@@ -195,12 +193,11 @@ a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
195 } 193 }
196 bs->length = num; 194 bs->length = num;
197 bs->data = s; 195 bs->data = s;
198 ret = 1; 196 return (1);
199 197
200err:
201 if (0) {
202err_sl: 198err_sl:
203 ASN1err(ASN1_F_A2I_ASN1_INTEGER, ASN1_R_SHORT_LINE); 199 ASN1err(ASN1_F_A2I_ASN1_INTEGER, ASN1_R_SHORT_LINE);
204 } 200err:
201 free(s);
205 return (ret); 202 return (ret);
206} 203}
diff --git a/src/lib/libssl/src/crypto/asn1/f_string.c b/src/lib/libssl/src/crypto/asn1/f_string.c
index c213c7a88d..14f6554ab3 100644
--- a/src/lib/libssl/src/crypto/asn1/f_string.c
+++ b/src/lib/libssl/src/crypto/asn1/f_string.c
@@ -154,8 +154,6 @@ a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size)
154 if (sp == NULL) { 154 if (sp == NULL) {
155 ASN1err(ASN1_F_A2I_ASN1_STRING, 155 ASN1err(ASN1_F_A2I_ASN1_STRING,
156 ERR_R_MALLOC_FAILURE); 156 ERR_R_MALLOC_FAILURE);
157 if (s != NULL)
158 free(s);
159 goto err; 157 goto err;
160 } 158 }
161 s = sp; 159 s = sp;
@@ -187,12 +185,11 @@ a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size)
187 } 185 }
188 bs->length = num; 186 bs->length = num;
189 bs->data = s; 187 bs->data = s;
190 ret = 1; 188 return (1);
191 189
192err:
193 if (0) {
194err_sl: 190err_sl:
195 ASN1err(ASN1_F_A2I_ASN1_STRING, ASN1_R_SHORT_LINE); 191 ASN1err(ASN1_F_A2I_ASN1_STRING, ASN1_R_SHORT_LINE);
196 } 192err:
193 free(s);
197 return (ret); 194 return (ret);
198} 195}