Skip to content

Commit

Permalink
Fix memory leak in ppdOpen.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Aug 1, 2019
1 parent 2062d36 commit b4909ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions cups/ppd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}
}
Expand Down

0 comments on commit b4909ef

Please sign in to comment.