Skip to content

Commit 4554f67

Browse files
author
Bryan Cain
committed
ppd-cache: fix memory leak
These fields were being allocated by _ppdCacheCreateWith*() but never freed by anything. Free them in _ppdCacheDestroy() to fix the leak. Based on commit 7e4b961850b66baf895fc0 in libppd.
1 parent 8055b86 commit 4554f67

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cups/ppd-cache.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2152,6 +2152,11 @@ _ppdCacheDestroy(_ppd_cache_t *pc) /* I - PPD cache and mapping data */
21522152
free(pc->charge_info_uri);
21532153
free(pc->password);
21542154

2155+
free(pc->sides_option);
2156+
free(pc->sides_1sided);
2157+
free(pc->sides_2sided_long);
2158+
free(pc->sides_2sided_short);
2159+
21552160
cupsArrayDelete(pc->mandatory);
21562161

21572162
cupsArrayDelete(pc->support_files);

0 commit comments

Comments
 (0)