Fix style(9) and remove m_freem(NULL).
Add XXX comment, it looks incorrect, because m_pkthdr.len is already incremented by M_PREPEND(). Sponsored by: Yandex LLC
This commit is contained in:
parent
040bcc9ac0
commit
3d6aff5615
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=275473
@ -145,12 +145,11 @@ key_sendup0(struct rawcb *rp, struct mbuf *m, int promisc)
|
||||
struct sadb_msg *pmsg;
|
||||
|
||||
M_PREPEND(m, sizeof(struct sadb_msg), M_NOWAIT);
|
||||
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));
|
||||
|
Loading…
Reference in New Issue
Block a user