diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-09-05 22:32:47 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-09-05 22:32:47 +0000 |
commit | 772191eebf6a62b3fe9de2482c910de8c79000d5 (patch) | |
tree | eea109f48afccf4e7cab1ea695e65fec36d1cf5e /sys/kern/subr_prf.c | |
parent | a30f0def118756a387cba2c5eac41a702277da77 (diff) |
make sure that va_start() has matching va_end()
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r-- | sys/kern/subr_prf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 6d24ef3e021..8ac3904b2ae 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_prf.c,v 1.34 2001/09/05 19:22:23 deraadt Exp $ */ +/* $OpenBSD: subr_prf.c,v 1.35 2001/09/05 22:32:39 deraadt Exp $ */ /* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */ /*- @@ -203,6 +203,7 @@ panic(fmt, va_alist) vsprintf(panicbuf, fmt, ap); panicstr = panicbuf; } + va_end(ap); printf("panic: "); va_start(ap, fmt); @@ -252,8 +253,8 @@ log(level, fmt, va_alist) logpri(level); /* log the level first */ va_start(ap, fmt); kprintf(fmt, TOLOG, NULL, NULL, ap); - splx(s); va_end(ap); + splx(s); if (!log_open) { va_start(ap, fmt); kprintf(fmt, TOCONS, NULL, NULL, ap); @@ -299,8 +300,8 @@ addlog(fmt, va_alist) s = splhigh(); va_start(ap, fmt); kprintf(fmt, TOLOG, NULL, NULL, ap); - splx(s); va_end(ap); + splx(s); if (!log_open) { va_start(ap, fmt); kprintf(fmt, TOCONS, NULL, NULL, ap); |