diff options
author | deraadt <> | 2014-04-21 11:37:41 +0000 |
---|---|---|
committer | deraadt <> | 2014-04-21 11:37:41 +0000 |
commit | a13698710d1bf0bac4832733da5c86886601b5d4 (patch) | |
tree | ad42acc3896c553cb79781bc3a1ead69a74d55a3 /src/lib/libcrypto/asn1/a_i2d_fp.c | |
parent | 6a6b6afb12953d4537a41790daa6abaad39258c5 (diff) | |
download | openbsd-a13698710d1bf0bac4832733da5c86886601b5d4.tar.gz openbsd-a13698710d1bf0bac4832733da5c86886601b5d4.tar.bz2 openbsd-a13698710d1bf0bac4832733da5c86886601b5d4.zip |
improve realloc/calloc/malloc patterns; ok guenther
Diffstat (limited to 'src/lib/libcrypto/asn1/a_i2d_fp.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_i2d_fp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/a_i2d_fp.c b/src/lib/libcrypto/asn1/a_i2d_fp.c index 082ba1b3a8..007e612b4a 100644 --- a/src/lib/libcrypto/asn1/a_i2d_fp.c +++ b/src/lib/libcrypto/asn1/a_i2d_fp.c | |||
@@ -89,7 +89,7 @@ ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x) | |||
89 | int i, j = 0, n, ret = 1; | 89 | int i, j = 0, n, ret = 1; |
90 | 90 | ||
91 | n = i2d(x, NULL); | 91 | n = i2d(x, NULL); |
92 | b = (char *)malloc(n); | 92 | b = malloc(n); |
93 | if (b == NULL) { | 93 | if (b == NULL) { |
94 | ASN1err(ASN1_F_ASN1_I2D_BIO, ERR_R_MALLOC_FAILURE); | 94 | ASN1err(ASN1_F_ASN1_I2D_BIO, ERR_R_MALLOC_FAILURE); |
95 | return (0); | 95 | return (0); |