]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix memory leak as well in load_ppd.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 13 Apr 2011 18:27:05 +0000 (18:27 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 13 Apr 2011 18:27:05 +0000 (18:27 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@9681 7a7537e8-13f0-0310-91df-b6672ffda945

scheduler/printers.c

index 2dedd55932f2e2f19a758a30f31f18037a590aa5..8d9a7f78b2c1e49b4023b8a54640b2e4267e1ca0 100644 (file)
@@ -4060,7 +4060,7 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
     ppd_info.st_mtime = 1;
 
   ippDelete(p->ppd_attrs);
-  p->ppd_attrs = ippNew();
+  p->ppd_attrs = NULL;
 
   _ppdCacheDestroy(p->pc);
   p->pc = NULL;
@@ -4094,6 +4094,8 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
   finishings[0]  = IPP_FINISHINGS_NONE;
   num_finishings = 1;
 
+  p->ppd_attrs = ippNew();
+
   if ((ppd = ppdOpenFile(ppd_name)) != NULL)
   {
    /*