From: Pranav Batra Date: Sat, 3 Oct 2020 01:19:08 +0000 (+0000) Subject: Fix memory leaks X-Git-Tag: v2.3.3op1~66^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b3ab8e1d00561edd217d24e3df179655283c9e1;p=thirdparty%2Fcups.git Fix memory leaks --- diff --git a/scheduler/conf.c b/scheduler/conf.c index bb6049b2c6..b61072cfbd 100644 --- a/scheduler/conf.c +++ b/scheduler/conf.c @@ -1245,7 +1245,10 @@ cupsdReadConfiguration(void) char *paper_result; /* Paper size name from libpaper */ if ((paper_result = systempapername()) != NULL) + { cupsdSetString(&DefaultPaperSize, paper_result); + free(paper_result); + } else #endif /* HAVE_LIBPAPER */ if (!DefaultLanguage || diff --git a/scheduler/printers.c b/scheduler/printers.c index e341bdb006..8f67c2bad8 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -822,12 +822,15 @@ cupsdDeletePrinter( ippDelete(p->attrs); ippDelete(p->ppd_attrs); + _ppdCacheDestroy(p->pc); + mimeDeleteType(MimeDatabase, p->filetype); mimeDeleteType(MimeDatabase, p->prefiltertype); cupsdFreeStrings(&(p->users)); cupsdFreeQuotas(p); + cupsdClearString(&p->uuid); cupsdClearString(&p->uri); cupsdClearString(&p->hostname); cupsdClearString(&p->name);