mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-13 05:41:26 +01:00
spl back down in unusual out-of-memory condition in udp_output().
Obtained from: Stevens, vol. 2, exercise 23.4 (solution p. 1083)
This commit is contained in:
parent
1fdbc7ae46
commit
1c09f77422
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6482
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)udp_usrreq.c 8.4 (Berkeley) 1/21/94
|
||||
* $Id: udp_usrreq.c,v 1.5 1995/02/16 00:27:46 wollman Exp $
|
||||
* $Id: udp_usrreq.c,v 1.6 1995/02/16 01:25:06 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -420,6 +420,8 @@ udp_output(inp, m, addr, control)
|
||||
M_PREPEND(m, sizeof(struct udpiphdr), M_DONTWAIT);
|
||||
if (m == 0) {
|
||||
error = ENOBUFS;
|
||||
if (addr)
|
||||
splx(s);
|
||||
goto release;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user