]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
ppd-cache: fix memory leak 1344/head
authorBryan Cain <bryancain@chromium.org>
Fri, 22 Aug 2025 18:56:49 +0000 (12:56 -0600)
committerBryan Cain <bryancain@chromium.org>
Fri, 22 Aug 2025 19:09:58 +0000 (13:09 -0600)
These fields were being allocated by _ppdCacheCreateWith*() but never
freed by anything. Free them in _ppdCacheDestroy() to fix the leak.

Based on commit 7e4b961850b66baf895fc0 in libppd.

cups/ppd-cache.c

index eb7b411b5e5b195f40f2811a171edba746d897b2..20e88522d39a511529977bdb0decc4c6932d3524 100644 (file)
@@ -2152,6 +2152,11 @@ _ppdCacheDestroy(_ppd_cache_t *pc)       /* I - PPD cache and mapping data */
   free(pc->charge_info_uri);
   free(pc->password);
 
+  free(pc->sides_option);
+  free(pc->sides_1sided);
+  free(pc->sides_2sided_long);
+  free(pc->sides_2sided_short);
+
   cupsArrayDelete(pc->mandatory);
 
   cupsArrayDelete(pc->support_files);