diff options
-rw-r--r-- | sys/netipsec/keysock.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/netipsec/keysock.c b/sys/netipsec/keysock.c index 5a6b84a..5fc5998 100644 --- a/sys/netipsec/keysock.c +++ b/sys/netipsec/keysock.c @@ -149,14 +149,11 @@ key_sendup0(rp, m, promisc) struct sadb_msg *pmsg; M_PREPEND(m, sizeof(struct sadb_msg), M_NOWAIT); - if (m && m->m_len < sizeof(struct sadb_msg)) - m = m_pullup(m, sizeof(struct sadb_msg)); - if (!m) { + if (m == NULL) { PFKEYSTAT_INC(in_nomem); - m_freem(m); - return ENOBUFS; + return (ENOBUFS); } - m->m_pkthdr.len += sizeof(*pmsg); + m->m_pkthdr.len += sizeof(*pmsg); /* XXX: is this correct? */ pmsg = mtod(m, struct sadb_msg *); bzero(pmsg, sizeof(*pmsg)); |