rlescak / rpms / cups

Forked from rpms/cups 2 years ago
Clone
Blob Blame History Raw
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);
 }