]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Remove unused variable 'sctx'
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Tue, 26 Oct 2021 02:49:02 +0000 (02:49 +0000)
committerTomas Mraz <tomas@openssl.org>
Wed, 27 Oct 2021 09:05:35 +0000 (11:05 +0200)
In the openssl-3.0.0 and system provided, the variable 'sctx' is unused in test_509_dup_cert.
Therefore, it might be better to remove the definition and operation of it.

CLA: trivial

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16916)

test/x509_dup_cert_test.c

index af35afbe0c984b38e8daed005fc4a226ef3930db..b09de70a8a5631222650f0daa6ee77c1bcac7d36 100644 (file)
@@ -17,7 +17,6 @@
 static int test_509_dup_cert(int n)
 {
     int ret = 0;
-    X509_STORE_CTX *sctx = NULL;
     X509_STORE *store = NULL;
     X509_LOOKUP *lookup = NULL;
     const char *cert_f = test_get_argument(n);
@@ -28,7 +27,6 @@ static int test_509_dup_cert(int n)
         && TEST_true(X509_load_cert_file(lookup, cert_f, X509_FILETYPE_PEM)))
         ret = 1;
 
-    X509_STORE_CTX_free(sctx);
     X509_STORE_free(store);
     return ret;
 }