Page MenuHomeFreeBSD
Authored By
gad
Mar 12 2017, 9:17 PM
Size
762 B
Referenced Files
None
Subscribers
None

chkprint-test.diff

Index: usr.sbin/lpr/chkprintcap/chkprintcap.c
===================================================================
--- usr.sbin/lpr/chkprintcap/chkprintcap.c (revision 315180)
+++ usr.sbin/lpr/chkprintcap/chkprintcap.c (working copy)
@@ -113,8 +113,13 @@
* the printcap file.
*/
skres = skim_printcap(pcap_fname, verbosity);
- if (skres->fatalerr)
- return (skres->fatalerr);
+ if (skres == NULL) {
+ problems = 1;
+ goto main_ret;
+ } else if (skres->fatalerr) {
+ problems = skres->fatalerr;
+ goto main_ret;
+ }
/*
* Now use the standard capability-db routines to check the values
@@ -156,6 +161,9 @@
warnx("WARNING: but only found %d queues to process!",
queuecnt);
}
+
+main_ret:
+ free(pcap_fname);
return (problems);
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
767703
Default Alt Text
chkprint-test.diff (762 B)

Event Timeline