diff options
author | maxim <maxim@FreeBSD.org> | 2006-05-21 17:52:08 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2006-05-21 17:52:08 +0000 |
commit | 2be20d920e7d20ca9ca90bce5b88693a2cfa576d (patch) | |
tree | 39adf0373aaf2efbd2b98b9d93341e33af31a03b /sys | |
parent | 11228d528e7b15f9b04696b0ddacbaf4ed4e232e (diff) | |
download | FreeBSD-src-2be20d920e7d20ca9ca90bce5b88693a2cfa576d.zip FreeBSD-src-2be20d920e7d20ca9ca90bce5b88693a2cfa576d.tar.gz |
o Add missed error check: in ip_ctloutput() sooptcopyin() returns a
result but we never examine it.
Reviewed by: rwatson
MFC after: 2 weeks
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_output.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 9cb9871..772c10f 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -824,6 +824,10 @@ ip_ctloutput(so, sopt) m->m_len = sopt->sopt_valsize; error = sooptcopyin(sopt, mtod(m, char *), m->m_len, m->m_len); + if (error) { + m_free(m); + break; + } INP_LOCK(inp); error = ip_pcbopts(inp, sopt->sopt_name, m); INP_UNLOCK(inp); |