mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Fix a (long standing?) bug in ip_output(): if ip_insertoptions() is
called and ip_output() encounters an error and bails (i.e. host unreachable), we will leak an mbuf. This is because the code calls m_freem(m0) after jumping to the bad: label at the end of the function, when it should be calling m_freem(m). (m0 is the original mbuf list _without_ the options mbuf prepended.) Obtained from: NetBSD
This commit is contained in:
parent
bc183b3fe8
commit
3528d68f71
1 changed files with 1 additions and 1 deletions
|
|
@ -982,7 +982,7 @@ done:
|
|||
#endif /* IPSEC */
|
||||
return (error);
|
||||
bad:
|
||||
m_freem(m0);
|
||||
m_freem(m);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue