summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/lpr/pac/pac.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/lpr/pac/pac.c b/usr.sbin/lpr/pac/pac.c
index 08de114..d68e625 100644
--- a/usr.sbin/lpr/pac/pac.c
+++ b/usr.sbin/lpr/pac/pac.c
@@ -450,7 +450,8 @@ chkprinter(s)
case PCAPERR_TCLOOP:
fatal(pp, "%s", pcaperr(stat));
}
- acctfile = pp->acct_file;
+ if ((acctfile = pp->acct_file) == NULL)
+ errx(3, "accounting not enabled for printer %s", s);
if (!pflag && pp->price100)
price = pp->price100/10000.0;
sumfile = (char *) calloc(sizeof(char), strlen(acctfile)+5);
OpenPOWER on IntegriCloud