summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_timeout.c
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2005-01-19 20:34:46 +0000
committercperciva <cperciva@FreeBSD.org>2005-01-19 20:34:46 +0000
commit958e0cd9a087b53e4555b6878abf25562214824e (patch)
tree6d619e779c3737deed0367f75a7a263ac210eca7 /sys/kern/kern_timeout.c
parent784984645a48c64b3c20321ac4b0acc20252cda7 (diff)
downloadFreeBSD-src-958e0cd9a087b53e4555b6878abf25562214824e.zip
FreeBSD-src-958e0cd9a087b53e4555b6878abf25562214824e.tar.gz
Make "c->c_func = NULL" conditional on the CALLOUT_LOCAL_ALLOC flag,
i.e., only clear c->c_func if the callout c is being used via the old timeout(9) interface. Requested by: glebius
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r--sys/kern/kern_timeout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index d9fe231..d1ff84f 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -232,8 +232,8 @@ softclock(void *dummy)
c_func = c->c_func;
c_arg = c->c_arg;
c_flags = c->c_flags;
- c->c_func = NULL;
if (c->c_flags & CALLOUT_LOCAL_ALLOC) {
+ c->c_func = NULL;
c->c_flags = CALLOUT_LOCAL_ALLOC;
SLIST_INSERT_HEAD(&callfree, c,
c_links.sle);
OpenPOWER on IntegriCloud