summaryrefslogtreecommitdiff
path: root/cups/ppd.c
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2019-08-01 13:02:23 -0400
committerMichael R Sweet <michael.r.sweet@gmail.com>2019-08-01 13:02:23 -0400
commitdb1c94f3a1720b26b46d91744d43bb3edb2765dd (patch)
treeb3666a3188074f90635dc8f2860262b758c85360 /cups/ppd.c
parent65048b860c3ba9f7b0ad590f6087c136bbe4776e (diff)
downloadcups-db1c94f3a1720b26b46d91744d43bb3edb2765dd.tar.gz
Fix memory leak in ppdOpen.
Diffstat (limited to 'cups/ppd.c')
-rw-r--r--cups/ppd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cups/ppd.c b/cups/ppd.c
index 862201127..ada0c14f7 100644
--- a/cups/ppd.c
+++ b/cups/ppd.c
@@ -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;
}
}