diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2002-09-12 12:43:24 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2002-09-12 12:43:24 +0000 |
commit | 5e160649cbb1039103e113108d099c3c2dcde44b (patch) | |
tree | ace3639d6d98560792160911c17f8e45b1e73613 | |
parent | d057b2cde18b200bd8603aef39c8c61c293f3d74 (diff) |
check for calloc() failure; ho@
-rw-r--r-- | sbin/pfctl/parse.y | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 3587714e45e..d6847c10edb 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.147 2002/09/12 10:05:08 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.148 2002/09/12 12:43:23 henning Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -391,6 +391,8 @@ antispoof : ANTISPOOF logquick antispoof_ifspc af { r.af = $4; j = calloc(1, sizeof(struct node_if)); + if (j == NULL) + errx(1, "antispoof: calloc"); strlcpy(j->ifname, i->ifname, IFNAMSIZ); j->not = 1; h = ifa_lookup(j->ifname, PFCTL_IFLOOKUP_NET); |