summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt3sas/mpt3sas_trigger_diag.h
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2013-06-25 11:27:31 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-07-08 17:36:21 +0100
commit8c0eb596baa51f2b43949c698c644727ef17805c (patch)
treece5746cb1ac689451ee0f5c4b5c730bf8740a0a0 /drivers/scsi/mpt3sas/mpt3sas_trigger_diag.h
parent6e97c9d5b85caaef9c2da7e410008df7e6d9d38a (diff)
downloadlinux-stable-8c0eb596baa51f2b43949c698c644727ef17805c.tar.gz
linux-stable-8c0eb596baa51f2b43949c698c644727ef17805c.tar.bz2
linux-stable-8c0eb596baa51f2b43949c698c644727ef17805c.zip
[SCSI] qla2xxx: Fix a memory leak in an error path of qla2x00_process_els()
Avoid that the fcport structure gets leaked if bsg_job->request->msgcode == FC_BSG_HST_ELS_NOLOGIN, the fcport allocation succeeds and the !vha->flags.online branch is taken. This was detected by Coverity. However, Coverity does not recognize that all qla2x00_process_els() callers specify either FC_BSG_RPT_ELS or FC_BSG_HST_ELS_NOLOGIN in the field bsg_job->request->msgcode and that the value of that field is not modified inside that function. This results in a false positive report about a possible memory leak in an error path for bsg_job->request->msgcode values other than the two mentioned values. Make it easy for Coverity (and for humans) to recognize that there is no fcport leak in the error path by changing the bsg_job->request->msgcode == FC_BSG_HST_ELS_NOLOGIN test into bsg_job->request->msgcode != FC_BSG_RPT_ELS. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mpt3sas/mpt3sas_trigger_diag.h')
0 files changed, 0 insertions, 0 deletions