summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-10-05 20:38:32 +0000
committerimp <imp@FreeBSD.org>2001-10-05 20:38:32 +0000
commitd3e4b82b69037389ddd7149ee65ddac5095efa4d (patch)
treeed36d5889422a2d98791084e99d5654c8eafb18c
parent34563ec4a5862b7ab60cf9005844d61552c0edcf (diff)
downloadFreeBSD-src-d3e4b82b69037389ddd7149ee65ddac5095efa4d.zip
FreeBSD-src-d3e4b82b69037389ddd7149ee65ddac5095efa4d.tar.gz
Don't core dump if we can't get the index automatically.
Debug info from: Ben Hockenhull <benh@jpj.net>
-rw-r--r--usr.sbin/pccard/pccardd/cardd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pccard/pccardd/cardd.c b/usr.sbin/pccard/pccardd/cardd.c
index 7b27bab..9c8dff1 100644
--- a/usr.sbin/pccard/pccardd/cardd.c
+++ b/usr.sbin/pccard/pccardd/cardd.c
@@ -644,7 +644,8 @@ assign_io(struct slot *sp)
break;
case AUTO_INDEX: /* auto */
cisconf = assign_card_index(sp, cis);
- sp->config->index = cisconf->id;
+ if (cisconf)
+ sp->config->index = cisconf->id;
break;
default: /* normal, use index value */
for (cisconf = cis->conf; cisconf; cisconf = cisconf->next)
OpenPOWER on IntegriCloud