cups/cups-ppdleak.patch
Zdenek Dohnal 701bef73e8 2.3.3
2020-05-19 10:42:33 +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);
}