Skip to content
Commit 92631fa4 authored by Jesper Juhl's avatar Jesper Juhl Committed by James Bottomley
Browse files

[SCSI] libsas: Fix potential NULL dereference in sas_smp_get_phy_events()



In sas_smp_get_phy_events() we never test if the call to
alloc_smp_req(RPEL_REQ_SIZE) succeeds or fails. That means we run
the risk of dereferencing a NULL pointer if it does fail. Far
better to test if we got NULL back and in that case return -ENOMEM
just as we already do for the other memory allocation in that
function.

Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 99d4d0a9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment