From: Zdenek Dohnal Date: Wed, 3 Sep 2025 06:22:31 +0000 (+0200) Subject: ppd-cache.c: fix memory leak in _cupsConvertOptions() X-Git-Tag: v2.4.13~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2777330a80cab74a7a00f932485a80ba7430680b;p=thirdparty%2Fcups.git ppd-cache.c: fix memory leak in _cupsConvertOptions() --- diff --git a/CHANGES.md b/CHANGES.md index be0cadddf5..5890a626dc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,6 +24,8 @@ Changes in CUPS v2.4.13 (YYYY-MM-DD) - Fixed support for the server name in the ErrorLog filename (Issue #1277) - Fixed job cleanup after daemon restart (Issue #1315) - Fixed handling of buggy DYMO USB printer serial numbers (Issue #1338) +- Fixed unreachable block in IPP backend (Issue #1351) +- Fixed memory leak in _cupsConvertOptions (Issue #1354) Changes in CUPS v2.4.12 (2025-04-08) diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index 4073ba1468..f5386532ca 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -229,6 +229,7 @@ _cupsConvertOptions( "y-dimension", size->length); ippAddCollection(media_col, IPP_TAG_ZERO, "media-size", media_size); + ippDelete(media_size); } for (i = 0; i < media_col_sup->num_values; i ++) @@ -248,6 +249,7 @@ _cupsConvertOptions( } ippAddCollection(request, IPP_TAG_JOB, "media-col", media_col); + ippDelete(media_col); } if ((keyword = cupsGetOption("output-bin", num_options, options)) == NULL)