iscsi_initiator(4): Fix another potential NULL pointer dereference.
authorSascha Wildner <saw@online.de>
Sun, 29 Aug 2010 19:24:09 +0000 (21:24 +0200)
committerSascha Wildner <saw@online.de>
Sun, 29 Aug 2010 19:24:09 +0000 (21:24 +0200)
so (which is sp->soc) can be NULL here, so add a check before dereferencing
it.

sys/dev/disk/iscsi/initiator/isc_soc.c

index 3a52a75..9d5b206 100644 (file)
@@ -612,7 +612,7 @@ isc_soc(void *vp)
          }
      }
      sdebug(2, "terminated, flags=%x so_state=%x error=%d proc=%p",
-           sp->flags, so->so_state, error, sp->proc);
+           sp->flags, so ? so->so_state : 0, error, sp->proc);
      if((sp->proc != NULL) && sp->signal) {
          PROC_LOCK(sp->proc);
          ksignal(sp->proc, sp->signal);