diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-01-21 12:23:46 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-01-21 12:23:46 +0000 |
commit | 35c052e4d0a3897776c875bfa2a201eece0ef6a6 (patch) | |
tree | 84f301d77e69c5cbc081ad4804c7d6ebe31ff328 | |
parent | b985970334405a34a25fd39480c8c1a991e6e5b1 (diff) |
Prevent a NULL-deref in the autoconf_verbose case
-rw-r--r-- | sys/kern/subr_autoconf.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index fa8751e8eee..13c6e0f6fcc 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_autoconf.c,v 1.18 1998/01/20 20:12:11 niklas Exp $ */ +/* $OpenBSD: subr_autoconf.c,v 1.19 1998/01/21 12:23:45 niklas Exp $ */ /* $NetBSD: subr_autoconf.c,v 1.21 1996/04/04 06:06:18 cgd Exp $ */ /* @@ -201,9 +201,12 @@ config_search(fn, parent, aux) } } if (autoconf_verbose) - printf(">>> probe for %s%d won\n", - ((struct cfdata *)m.match)->cf_driver->cd_name, - ((struct cfdata *)m.match)->cf_unit); + if (m.match) + printf(">>> probe for %s%d won\n", + ((struct cfdata *)m.match)->cf_driver->cd_name, + ((struct cfdata *)m.match)->cf_unit); + else + printf(">>> no winning probe\n"); return (m.match); } |