summaryrefslogtreecommitdiffstats
path: root/sys/opencrypto
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2006-05-18 06:28:39 +0000
committerpjd <pjd@FreeBSD.org>2006-05-18 06:28:39 +0000
commitca50154286e58971ef7165ee7018ebd6a0540281 (patch)
treed894e3aae5e2344eb7567c9813aeca8146750240 /sys/opencrypto
parent3c24c7a01c21e23af619d911717333c693d2904b (diff)
downloadFreeBSD-src-ca50154286e58971ef7165ee7018ebd6a0540281.zip
FreeBSD-src-ca50154286e58971ef7165ee7018ebd6a0540281.tar.gz
Silent Coverity Prevent report by asserting that cap != NULL.
Coverity ID: 1414
Diffstat (limited to 'sys/opencrypto')
-rw-r--r--sys/opencrypto/crypto.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c
index e1c7e99..74f147e 100644
--- a/sys/opencrypto/crypto.c
+++ b/sys/opencrypto/crypto.c
@@ -1071,8 +1071,8 @@ crypto_proc(void)
* Driver cannot disappeared when there is an active
* session.
*/
- KASSERT(cap != NULL, ("%s: Driver disappeared.",
- __func__));
+ KASSERT(cap != NULL, ("%s:%u Driver disappeared.",
+ __func__, __LINE__));
if (cap == NULL || cap->cc_process == NULL) {
/* Op needs to be migrated, process it. */
if (submit == NULL)
@@ -1105,6 +1105,8 @@ crypto_proc(void)
CRYPTO_Q_UNLOCK();
hid = CRYPTO_SESID2HID(submit->crp_sid);
cap = crypto_checkdriver(hid);
+ KASSERT(cap != NULL, ("%s:%u Driver disappeared.",
+ __func__, __LINE__));
result = crypto_invoke(cap, submit, hint);
CRYPTO_Q_LOCK();
if (result == ERESTART) {
OpenPOWER on IntegriCloud