iscsi_initiator(4): Fix a potential NULL pointer dereference.
authorSascha Wildner <saw@online.de>
Sun, 29 Aug 2010 19:13:27 +0000 (21:13 +0200)
committerSascha Wildner <saw@online.de>
Sun, 29 Aug 2010 19:14:19 +0000 (21:14 +0200)
commit8e44e5711c1cd574d2c6dc46faa819b9f2c2f498
tree697b745c98129f60ac8cb7da81dfddb1939548ff
parent438acbcc599b3db8b97949a152027f27f8028066
iscsi_initiator(4): Fix a potential NULL pointer dereference.

If sp can be NULL (as the rest of the code suggests), we can't use sdebug()
since that prints the string with sp->sid prepended (thereby dereferencing
NULL).

Instead, use debug() and add sp->sid to its string (with a check for NULL).

While here, fix some indentation issues.
sys/dev/disk/iscsi/initiator/isc_soc.c