diff options
author | glebius <glebius@FreeBSD.org> | 2005-08-21 19:48:51 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-08-21 19:48:51 +0000 |
commit | 1d5b220fd5bc9c7ccca052fd6a9a93983b228eee (patch) | |
tree | eaf86e5b4aa6b350da2fa2c8883d791c806d672d | |
parent | 1a29043b19c355d4823fad0b0533117f4eb3d1a4 (diff) | |
download | FreeBSD-src-1d5b220fd5bc9c7ccca052fd6a9a93983b228eee.zip FreeBSD-src-1d5b220fd5bc9c7ccca052fd6a9a93983b228eee.tar.gz |
In ng_callout() assert that supplied arguments are non-NULL.
-rw-r--r-- | sys/netgraph/ng_base.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index ac2568e..fa863db 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -3558,9 +3558,10 @@ ng_uncallout(struct callout *c, node_p node) { item_p item; int rval; - - if (c == NULL) - return (0); + + KASSERT(c != NULL, ("ng_uncallout: NULL callout")); + KASSERT(node != NULL, ("ng_uncallout: NULL node")); + rval = callout_stop(c); item = c->c_arg; /* Do an extra check */ |