diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 1999-06-01 23:43:43 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 1999-06-01 23:43:43 +0000 |
commit | 83226c98c22fe6057e7b537a7ff0b34d8e4670f1 (patch) | |
tree | 79126e401ee1c50dc834f58b3a0aa94b69220410 /sys/net/pfkey.c | |
parent | 71f28fb5b9b69242cdb2409406fadb49fae0141e (diff) |
Introduce M_PFKEY kmem type, and use it. (angelos@ ok)
Diffstat (limited to 'sys/net/pfkey.c')
-rw-r--r-- | sys/net/pfkey.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/pfkey.c b/sys/net/pfkey.c index 46a0a4f33fa..ba820e40b6f 100644 --- a/sys/net/pfkey.c +++ b/sys/net/pfkey.c @@ -135,7 +135,7 @@ pfkey_output(struct mbuf *mbuf, struct socket *socket) goto ret; } - if (!(message = malloc((unsigned long) mbuf->m_pkthdr.len, M_TEMP, + if (!(message = malloc((unsigned long) mbuf->m_pkthdr.len, M_PFKEY, M_DONTWAIT))) { error = ENOMEM; goto ret; @@ -270,7 +270,7 @@ pfkey_buildprotosw(void) j++; if (j) { - if (!(protosw = malloc(j * sizeof(struct protosw), M_TEMP, M_DONTWAIT))) + if (!(protosw = malloc(j * sizeof(struct protosw), M_PFKEY, M_DONTWAIT))) return ENOMEM; for (i = 0, p = protosw; i <= PFKEY_PROTOCOL_MAX; i++) @@ -281,18 +281,18 @@ pfkey_buildprotosw(void) } if (pfkey_domain.dom_protosw) - free(pfkey_domain.dom_protosw, M_TEMP); + free(pfkey_domain.dom_protosw, M_PFKEY); pfkey_domain.dom_protosw = protosw; pfkey_domain.dom_protoswNPROTOSW = p; } else { - if (!(protosw = malloc(sizeof(struct protosw), M_TEMP, M_DONTWAIT))) + if (!(protosw = malloc(sizeof(struct protosw), M_PFKEY, M_DONTWAIT))) return ENOMEM; bcopy(&pfkey_protosw_template, protosw, sizeof(struct protosw)); if (pfkey_domain.dom_protosw) - free(pfkey_domain.dom_protosw, M_TEMP); + free(pfkey_domain.dom_protosw, M_PFKEY); pfkey_domain.dom_protosw = protosw; pfkey_domain.dom_protoswNPROTOSW = protosw; |