Fix a potential NULL-pointer dereference in padlock(4).
Spotted by: Coverity (via pjd) MFC after: 1 week
This commit is contained in:
parent
ee3d6ade2e
commit
f3d74d62d3
@ -297,7 +297,11 @@ padlock_process(device_t dev, struct cryptop *crp, int hint __unused)
|
||||
|
||||
enccrd = maccrd = NULL;
|
||||
|
||||
if (crp == NULL || crp->crp_callback == NULL || crp->crp_desc == NULL) {
|
||||
/* Sanity check. */
|
||||
if (crp == NULL)
|
||||
return (EINVAL);
|
||||
|
||||
if (crp->crp_callback == NULL || crp->crp_desc == NULL) {
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user