summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_strnid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/a_strnid.c')
-rw-r--r--src/lib/libcrypto/asn1/a_strnid.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/a_strnid.c b/src/lib/libcrypto/asn1/a_strnid.c
index be28885363..4da45c537e 100644
--- a/src/lib/libcrypto/asn1/a_strnid.c
+++ b/src/lib/libcrypto/asn1/a_strnid.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_strnid.c,v 1.17 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: a_strnid.c,v 1.18 2014/10/28 05:46:55 miod Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -261,8 +261,14 @@ ASN1_STRING_TABLE_add(int nid, long minsize, long maxsize, unsigned long mask,
261 if (maxsize != -1) 261 if (maxsize != -1)
262 tmp->maxsize = maxsize; 262 tmp->maxsize = maxsize;
263 tmp->mask = mask; 263 tmp->mask = mask;
264 if (new_nid) 264 if (new_nid) {
265 sk_ASN1_STRING_TABLE_push(stable, tmp); 265 if (sk_ASN1_STRING_TABLE_push(stable, tmp) == 0) {
266 free(tmp);
267 ASN1err(ASN1_F_ASN1_STRING_TABLE_ADD,
268 ERR_R_MALLOC_FAILURE);
269 return 0;
270 }
271 }
266 return 1; 272 return 1;
267} 273}
268 274