From 7c371183d9125b9de37462f9f7ed7d35cbdc5813 Mon Sep 17 00:00:00 2001 From: Bryan Cain Date: Fri, 22 Aug 2025 12:56:49 -0600 Subject: [PATCH] ppd-cache: fix memory leak 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index eb7b411b5e..20e88522d3 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -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); -- 2.47.3