Don't refer to xs->cmd, even via a pointer to xs->cmd, after xs has
authorkrw <krw@openbsd.org>
Mon, 2 Aug 2010 23:00:54 +0000 (23:00 +0000)
committerkrw <krw@openbsd.org>
Mon, 2 Aug 2010 23:00:54 +0000 (23:00 +0000)
been put back in the pool. Fixes Daniel Dickman's ses device.

ok matthew@ deraadt@

sys/scsi/ses.c

index b6674ad..f67b490 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ses.c,v 1.48 2010/07/22 00:31:06 krw Exp $ */
+/*     $OpenBSD: ses.c,v 1.49 2010/08/02 23:00:54 krw Exp $ */
 
 /*
  * Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -301,7 +301,7 @@ ses_read_config(struct ses_softc *sc)
        }
 
        cfg = (struct ses_config_hdr *)buf;
-       if (cfg->pgcode != cmd->pgcode || betoh16(cfg->length) >
+       if (cfg->pgcode != SES_PAGE_CONFIG || betoh16(cfg->length) >
            SES_BUFLEN) {
                free(buf, M_DEVBUF);
                return (1);