From: Jesper Juhl Date: Fri, 27 Jul 2007 23:13:33 +0000 (+0200) Subject: [SCSI] libsas: Fix potential NULL dereference in sas_smp_get_phy_events() X-Git-Tag: v2.6.23-rc2~164^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92631fa4d0afa64b82144eab714fbf2f4049dabe;p=pandora-kernel.git [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: Jesper Juhl Signed-off-by: James Bottomley --- Reading git-diff-tree failed