Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F857493
chkprint-test.diff
gad (Garance A Drosehn)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
gad
Mar 12 2017, 9:17 PM
2017-03-12 21:17:28 (UTC+0)
Size
762 B
Referenced Files
None
Subscribers
None
chkprint-test.diff
View Options
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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
767703
Default Alt Text
chkprint-test.diff (762 B)
Attached To
Mode
D9954: Fix a memory leak in lpr
Attached
Detach File
Event Timeline
Log In to Comment