netipsec key_register: check for M_NOWAIT alloc failure
Reviewed by: ae, cem Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20742
This commit is contained in:
parent
343a7eabf3
commit
0e2464ea18
@ -7164,7 +7164,7 @@ key_register(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp)
|
||||
return key_senderror(so, m, ENOBUFS);
|
||||
|
||||
MGETHDR(n, M_NOWAIT, MT_DATA);
|
||||
if (len > MHLEN) {
|
||||
if (n != NULL && len > MHLEN) {
|
||||
if (!(MCLGET(n, M_NOWAIT))) {
|
||||
m_freem(n);
|
||||
n = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user