]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
pkcs11: Use unused return value of C_GetMechanismList
authorrobinleander <rleanderschroeder@gmail.com>
Tue, 27 Mar 2018 20:50:28 +0000 (22:50 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 29 Mar 2018 15:18:27 +0000 (17:18 +0200)
Closes strongswan/strongswan#96.

src/libstrongswan/plugins/pkcs11/pkcs11_library.c

index 89ae1969ee91c23915739f9cf2fede9832dbc636..8d5f4a22f31fe3fa84241643e8d0b06e9834e933 100644 (file)
@@ -899,8 +899,8 @@ METHOD(pkcs11_library_t, create_mechanism_enumerator, enumerator_t*,
                return enumerator_create_empty();
        }
        enumerator->mechs = malloc(sizeof(CK_MECHANISM_TYPE) * enumerator->count);
-       enumerator->lib->f->C_GetMechanismList(slot, enumerator->mechs,
-                                                                                  &enumerator->count);
+       rv = enumerator->lib->f->C_GetMechanismList(slot, enumerator->mechs,
+                                                                                               &enumerator->count);
        if (rv != CKR_OK)
        {
                DBG1(DBG_CFG, "C_GetMechanismList() failed: %N", ck_rv_names, rv);