diff options
Diffstat (limited to 'sbin/pfctl')
-rw-r--r-- | sbin/pfctl/pfctl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index f65ebb77254..b08f7302337 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.358 2018/09/08 14:12:57 kn Exp $ */ +/* $OpenBSD: pfctl.c,v 1.359 2018/09/08 14:45:55 kn Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -2496,8 +2496,6 @@ main(int argc, char *argv[]) /* NOTREACHED */ } - if ((path = calloc(1, PATH_MAX)) == NULL) - errx(1, "pfctl: calloc"); memset(anchorname, 0, sizeof(anchorname)); if (anchoropt != NULL) { if (mode == O_RDONLY && showopt == NULL) { @@ -2541,6 +2539,9 @@ main(int argc, char *argv[]) if (pfctl_disable(dev, opts)) error = 1; + if ((path = calloc(1, PATH_MAX)) == NULL) + errx(1, "%s: calloc", __func__); + if (showopt != NULL) { switch (*showopt) { case 'A': |