diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-07-24 01:45:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-07-24 01:45:30 +0000 |
commit | bb3c450014932bc885f568a3c24d170728ec593a (patch) | |
tree | c177eb57ddd3a47013a883c4735d1a52d1905f43 /sys/netinet | |
parent | a608e3ef9e8388d7e633fe045c68bcada8ee50e9 (diff) |
bail properly if malloc fails
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_ipsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c index cd59082e1bf..c20916e13bf 100644 --- a/sys/netinet/ip_ipsp.c +++ b/sys/netinet/ip_ipsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.c,v 1.15 1997/07/18 18:09:56 provos Exp $ */ +/* $OpenBSD: ip_ipsp.c,v 1.16 1997/07/24 01:45:29 deraadt Exp $ */ /* * The author of this code is John Ioannidis, ji@tla.org, @@ -127,8 +127,8 @@ reserve_spi(u_int32_t tspi, struct in_addr src, u_int8_t proto, int *errval) MALLOC(tdbp, struct tdb *, sizeof(*tdbp), M_TDB, M_WAITOK); if (tdbp == NULL) { - spi = 0; (*errval) = ENOBUFS; + return 0; } bzero((caddr_t) tdbp, sizeof(*tdbp)); |