summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-08-21 19:48:51 +0000
committerglebius <glebius@FreeBSD.org>2005-08-21 19:48:51 +0000
commit1d5b220fd5bc9c7ccca052fd6a9a93983b228eee (patch)
treeeaf86e5b4aa6b350da2fa2c8883d791c806d672d
parent1a29043b19c355d4823fad0b0533117f4eb3d1a4 (diff)
downloadFreeBSD-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.c7
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 */
OpenPOWER on IntegriCloud