Round #2 of scan-build warnings cleanup
This commit is contained in:
@@ -121,17 +121,13 @@ p11_module_init_once(void *context)
|
||||
fprintf(stderr, "p11_module_init(%s): %s\n", PKCS11_MODULE_PATH, dlerror());
|
||||
}
|
||||
#endif
|
||||
if (pkcs11_module_handle == NULL) {
|
||||
rv = CKR_LIBRARY_LOAD_FAILED;
|
||||
if (pkcs11_module_handle == NULL)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
C_GetFunctionList_fn = (CK_RV (*)(CK_FUNCTION_LIST_PTR_PTR))
|
||||
dlsym(pkcs11_module_handle, "C_GetFunctionList");
|
||||
if (C_GetFunctionList_fn == NULL) {
|
||||
rv = CKR_LIBRARY_LOAD_FAILED;
|
||||
if (C_GetFunctionList_fn == NULL)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
rv = C_GetFunctionList_fn(&module);
|
||||
if (rv != CKR_OK)
|
||||
|
@@ -603,7 +603,8 @@ EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c)
|
||||
return ret;
|
||||
}
|
||||
if (c->cipher_data) {
|
||||
memset(c->cipher_data, 0, c->cipher->ctx_size);
|
||||
if (c->cipher)
|
||||
memset(c->cipher_data, 0, c->cipher->ctx_size);
|
||||
free(c->cipher_data);
|
||||
c->cipher_data = NULL;
|
||||
}
|
||||
|
@@ -103,10 +103,7 @@ main(int argc, char **argv)
|
||||
exit(0);
|
||||
}
|
||||
|
||||
argc -= idx;
|
||||
argv += idx;
|
||||
|
||||
if (argc != 0)
|
||||
if (argc != idx)
|
||||
usage(1);
|
||||
|
||||
buffer = emalloc(len);
|
||||
|
Reference in New Issue
Block a user