]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
SCSI: libiscsi: fix iscsi pool error path
authorJean Delvare <jdelvare@suse.de>
Thu, 5 Mar 2009 20:45:55 +0000 (14:45 -0600)
committerChris Wright <chrisw@sous-sol.org>
Mon, 27 Apr 2009 17:36:59 +0000 (10:36 -0700)
commit10b9c3cd8848919561d16570759c0146988cb8d5
tree9eeaedb03d34e6547fad903bab2187aaf13b92e4
parentdf76bd846a1c4a2264ad670c5b11aa2497edce19
SCSI: libiscsi: fix iscsi pool error path

upstream commit: f474a37bc48667595b5653a983b635c95ed82a3b

Memory freeing in iscsi_pool_free() looks wrong to me. Either q->pool
can be NULL and this should be tested before dereferencing it, or it
can't be NULL and it shouldn't be tested at all. As far as I can see,
the only case where q->pool is NULL is on early error in
iscsi_pool_init(). One possible way to fix the bug is thus to not
call iscsi_pool_free() in this case (nothing needs to be freed anyway)
and then we can get rid of the q->pool check.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/scsi/libiscsi.c