cups/cups-ppdleak.patch
Petr Šabata 2f721cea89 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/cups#d1b1c28d68dd50f836a2011fe57edd27461bc5e5
2020-10-14 23:24:15 +02:00

23 lines
659 B
Diff

diff --git a/ppdc/ppdc-import.cxx b/ppdc/ppdc-import.cxx
index 04b587d..60d8834 100644
--- a/ppdc/ppdc-import.cxx
+++ b/ppdc/ppdc-import.cxx
@@ -27,7 +27,7 @@ ppdcSource::import_ppd(const char *f) // I - Filename
char line[256], // Comment line
*ptr; // Pointer into line
int cost; // Cost for filter
- ppd_file_t *ppd; // PPD file data
+ ppd_file_t *ppd = NULL; // PPD file data
ppd_group_t *group; // PPD group
ppd_option_t *option; // PPD option
ppd_choice_t *choice; // PPD choice
@@ -323,5 +323,8 @@ ppdcSource::import_ppd(const char *f) // I - Filename
}
}
+ if (ppd)
+ ppdClose(ppd);
+
return (1);
}