]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix memory leak in ppdOpen.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Thu, 1 Aug 2019 17:02:35 +0000 (13:02 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Thu, 1 Aug 2019 17:02:35 +0000 (13:02 -0400)
CHANGES.md
cups/ppd.c

index 2e677a5bc20cc290c7798cfc5d7bad4be4e74cb5..1c1bc05cb0c8539bed9f3a80c374c5e194069153 100644 (file)
@@ -32,6 +32,7 @@ Changes in CUPS v2.2.12
 - The scheduler would restart continuously when idle and printers were not
   shared (rdar://52561199)
 - Fixed a command ordering issue in the Zebra ZPL driver.
+- Fixed a memory leak in `ppdOpen`.
 
 
 Changes in CUPS v2.2.11
index 29456d97a5c5a1c38479d1e89f6e66fe34e16579..8088fd04e5b7c983b1662ce004a3351e9eef1541 100644 (file)
@@ -716,6 +716,8 @@ _ppdOpen(
           strncmp(ll, keyword, ll_len)))
       {
        DEBUG_printf(("2_ppdOpen: Ignoring localization: \"%s\"\n", keyword));
+       free(string);
+       string = NULL;
        continue;
       }
       else if (localization == _PPD_LOCALIZATION_ICC_PROFILES)
@@ -735,6 +737,8 @@ _ppdOpen(
        if (i >= (int)(sizeof(color_keywords) / sizeof(color_keywords[0])))
        {
          DEBUG_printf(("2_ppdOpen: Ignoring localization: \"%s\"\n", keyword));
+         free(string);
+         string = NULL;
          continue;
        }
       }