aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/a_strnid.c
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2016-03-06 21:40:58 +0100
committerFdaSilvaYY <fdasilvayy@gmail.com>2016-05-29 01:36:11 +0200
commitf59f23c38331e3adf58c0317caf319a7bfd82dd1 (patch)
treed2cea2e198f2d217dd688ee235217a473f00629d /crypto/asn1/a_strnid.c
parent8e89e85f556f549f05d3b49f5408a217ac5e3700 (diff)
downloadopenssl-f59f23c38331e3adf58c0317caf319a7bfd82dd1.zip
openssl-f59f23c38331e3adf58c0317caf319a7bfd82dd1.tar.gz
openssl-f59f23c38331e3adf58c0317caf319a7bfd82dd1.tar.bz2
Add more zalloc
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/997)
Diffstat (limited to 'crypto/asn1/a_strnid.c')
-rw-r--r--crypto/asn1/a_strnid.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/asn1/a_strnid.c b/crypto/asn1/a_strnid.c
index 188fa9e..53832c8 100644
--- a/crypto/asn1/a_strnid.c
+++ b/crypto/asn1/a_strnid.c
@@ -199,7 +199,7 @@ static ASN1_STRING_TABLE *stable_get(int nid)
tmp = ASN1_STRING_TABLE_get(nid);
if (tmp && tmp->flags & STABLE_FLAGS_MALLOC)
return tmp;
- rv = OPENSSL_malloc(sizeof(*rv));
+ rv = OPENSSL_zalloc(sizeof(*rv));
if (rv == NULL)
return NULL;
if (!sk_ASN1_STRING_TABLE_push(stable, rv)) {
@@ -213,10 +213,8 @@ static ASN1_STRING_TABLE *stable_get(int nid)
rv->mask = tmp->mask;
rv->flags = tmp->flags | STABLE_FLAGS_MALLOC;
} else {
- rv->nid = NID_undef;
rv->minsize = -1;
rv->maxsize = -1;
- rv->mask = 0;
rv->flags = STABLE_FLAGS_MALLOC;
}
return rv;