]> bbs.cooldavid.org Git - net-next-2.6.git/commit
[SCSI] qla2xxx: Fix NULL ptr deref bug in fail path during queue create
authorAnirban Chakraborty <anirban.chakraborty@qlogic.com>
Mon, 28 Sep 2009 20:52:58 +0000 (13:52 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Fri, 2 Oct 2009 19:13:04 +0000 (14:13 -0500)
commitc7922a911c42c5a8bdee6cc75eb6bd66937d4217
tree5afe423e0e91624289b6a09af8268cc6896994d3
parent2c2ed8bfd899b84ecbf71d28fcc2cc4ace36c8d9
[SCSI] qla2xxx: Fix NULL ptr deref bug in fail path during queue create

Current code attempts to clean up resources when queue create fails and there it
invokes queue free call with a (NULL) pointer to the queue which could not be
allocated in the first place. Fix it by returning directly without invoking the
queue free call as no resources has been allocated at that point of time.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla2xxx/qla_mid.c