summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_sample.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-01-10 07:13:58 +0000
committerjulian <julian@FreeBSD.org>2001-01-10 07:13:58 +0000
commitbb6dbcf3b2a0d48c5fc4d87972a640bdeccff1ea (patch)
tree72128a38e39aa7ad0bea118671db5ee332aff87e /sys/netgraph/ng_sample.c
parentcb4e03f2d838eb75831d178dcbf3f5d4564dbf95 (diff)
downloadFreeBSD-src-bb6dbcf3b2a0d48c5fc4d87972a640bdeccff1ea.zip
FreeBSD-src-bb6dbcf3b2a0d48c5fc4d87972a640bdeccff1ea.tar.gz
Fix some memory leaks
Add memory leak detection assitance.
Diffstat (limited to 'sys/netgraph/ng_sample.c')
-rw-r--r--sys/netgraph/ng_sample.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/netgraph/ng_sample.c b/sys/netgraph/ng_sample.c
index 90ed838..5c98b83 100644
--- a/sys/netgraph/ng_sample.c
+++ b/sys/netgraph/ng_sample.c
@@ -54,6 +54,14 @@
#include <netgraph/ng_sample.h>
#include <netgraph/netgraph.h>
+/* If you do complicated mallocs you may want to do this */
+/* and use it for your mallocs */
+#ifdef NG_SEPARATE_MALLOC
+MALLOC_DEFINE(M_NETGRAPH_XXX, "netgraph_xxx", "netgraph xxx node ");
+#else
+#define M_NETGRAPH_XXX M_NETGRAPH
+#endif
+
/*
* This section contains the netgraph method declarations for the
* sample node. These methods define the netgraph 'type'.
OpenPOWER on IntegriCloud