]> 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:23 +0000 (13:02 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Thu, 1 Aug 2019 17:02:23 +0000 (13:02 -0400)
CHANGES.md
cups/ppd.c

index 9a434e7509dda593d41c3fefca6b647ed39ad641..920493c8875efb153bab928f44af9f003b353408 100644 (file)
@@ -29,6 +29,7 @@ Changes in CUPS v2.3.0
   shared (rdar://52561199)
 - Fixed an issue with `EXPECT !name WITH-VALUE ...` tests.
 - Fixed a command ordering issue in the Zebra ZPL driver.
+- Fixed a memory leak in `ppdOpen`.
 
 
 Changes in CUPS v2.3rc1
index 86220112716dfc580f0e81749c361e38400833c2..ada0c14f7ed90c46ee84fcc51e8a4793453966df 100644 (file)
@@ -705,6 +705,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)
@@ -724,6 +726,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;
        }
       }