diff options
| author | tb <> | 2022-01-04 20:02:22 +0000 |
|---|---|---|
| committer | tb <> | 2022-01-04 20:02:22 +0000 |
| commit | 096dbea069e7725e6ebb86297230cd4d5a770ed5 (patch) | |
| tree | dc19052bdf8d350a3627d428ca7825ed1709cc15 /src/lib/libc | |
| parent | 19963bba1e39d5ee525617e6f3d5be4ef715237a (diff) | |
| download | openbsd-096dbea069e7725e6ebb86297230cd4d5a770ed5.tar.gz openbsd-096dbea069e7725e6ebb86297230cd4d5a770ed5.tar.bz2 openbsd-096dbea069e7725e6ebb86297230cd4d5a770ed5.zip | |
Drop a pointless NULL check
IPAddressOrRange_new() instantiates a choice type, so we need to
allocate one member of the union ourselves, so aor->u.addressPrefix
will always be NULL.
ok inoguchi jsing
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_addr.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x509_addr.c b/src/lib/libcrypto/x509/x509_addr.c index 227d934806..684a115401 100644 --- a/src/lib/libcrypto/x509/x509_addr.c +++ b/src/lib/libcrypto/x509/x509_addr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_addr.c,v 1.49 2022/01/04 19:56:53 tb Exp $ */ | 1 | /* $OpenBSD: x509_addr.c,v 1.50 2022/01/04 20:02:22 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Contributed to the OpenSSL Project by the American Registry for | 3 | * Contributed to the OpenSSL Project by the American Registry for |
| 4 | * Internet Numbers ("ARIN"). | 4 | * Internet Numbers ("ARIN"). |
| @@ -810,8 +810,7 @@ make_addressPrefix(IPAddressOrRange **result, unsigned char *addr, | |||
| 810 | if (aor == NULL) | 810 | if (aor == NULL) |
| 811 | return 0; | 811 | return 0; |
| 812 | aor->type = IPAddressOrRange_addressPrefix; | 812 | aor->type = IPAddressOrRange_addressPrefix; |
| 813 | if (aor->u.addressPrefix == NULL && | 813 | if ((aor->u.addressPrefix = ASN1_BIT_STRING_new()) == NULL) |
| 814 | (aor->u.addressPrefix = ASN1_BIT_STRING_new()) == NULL) | ||
| 815 | goto err; | 814 | goto err; |
| 816 | if (!ASN1_BIT_STRING_set(aor->u.addressPrefix, addr, bytelen)) | 815 | if (!ASN1_BIT_STRING_set(aor->u.addressPrefix, addr, bytelen)) |
| 817 | goto err; | 816 | goto err; |
