]> 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)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 13 Mar 2009 20:25:53 +0000 (15:25 -0500)
commitf474a37bc48667595b5653a983b635c95ed82a3b
treee8c61e0d9c09eb96eda58a2c68ede724e94d5879
parent07c00ec449d4d94042063a6900d7d04fdc9f8e62
[SCSI] libiscsi: fix iscsi pool error path

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>
drivers/scsi/libiscsi.c