diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/x509/x509_lib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_lib.c b/src/lib/libcrypto/x509/x509_lib.c index a518d5b950..e265d30f89 100644 --- a/src/lib/libcrypto/x509/x509_lib.c +++ b/src/lib/libcrypto/x509/x509_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_lib.c,v 1.3 2021/11/01 20:53:08 tb Exp $ */ | 1 | /* $OpenBSD: x509_lib.c,v 1.4 2022/07/24 21:41:29 tb 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 | */ |
@@ -314,8 +314,9 @@ X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, | |||
314 | } | 314 | } |
315 | /* If delete, just delete it */ | 315 | /* If delete, just delete it */ |
316 | if (ext_op == X509V3_ADD_DELETE) { | 316 | if (ext_op == X509V3_ADD_DELETE) { |
317 | if (!sk_X509_EXTENSION_delete(*x, extidx)) | 317 | if ((extmp = sk_X509_EXTENSION_delete(*x, extidx)) == NULL) |
318 | return -1; | 318 | return -1; |
319 | X509_EXTENSION_free(extmp); | ||
319 | return 1; | 320 | return 1; |
320 | } | 321 | } |
321 | } else { | 322 | } else { |