Commit 7ea4fcb7 authored by Aurimas Fischer's avatar Aurimas Fischer Committed by Alexandre Julliard

winspool.drv: Properly free destinations list returned by CUPS.

parent 2b22863f
...@@ -460,6 +460,7 @@ static BOOL add_printer_driver(const char *name) ...@@ -460,6 +460,7 @@ static BOOL add_printer_driver(const char *name)
} }
#ifdef SONAME_LIBCUPS #ifdef SONAME_LIBCUPS
static typeof(cupsFreeDests) *pcupsFreeDests;
static typeof(cupsGetDests) *pcupsGetDests; static typeof(cupsGetDests) *pcupsGetDests;
static typeof(cupsGetPPD) *pcupsGetPPD; static typeof(cupsGetPPD) *pcupsGetPPD;
static typeof(cupsPrintFile) *pcupsPrintFile; static typeof(cupsPrintFile) *pcupsPrintFile;
...@@ -486,6 +487,7 @@ static BOOL CUPS_LoadPrinters(void) ...@@ -486,6 +487,7 @@ static BOOL CUPS_LoadPrinters(void)
p##x = wine_dlsym(cupshandle, #x, NULL,0); \ p##x = wine_dlsym(cupshandle, #x, NULL,0); \
if (!p##x) return FALSE; if (!p##x) return FALSE;
DYNCUPS(cupsFreeDests);
DYNCUPS(cupsGetPPD); DYNCUPS(cupsGetPPD);
DYNCUPS(cupsGetDests); DYNCUPS(cupsGetDests);
DYNCUPS(cupsPrintFile); DYNCUPS(cupsPrintFile);
...@@ -566,6 +568,7 @@ static BOOL CUPS_LoadPrinters(void) ...@@ -566,6 +568,7 @@ static BOOL CUPS_LoadPrinters(void)
} }
if (hadprinter & !haddefault) if (hadprinter & !haddefault)
WINSPOOL_SetDefaultPrinter(dests[0].name, dests[0].name, TRUE); WINSPOOL_SetDefaultPrinter(dests[0].name, dests[0].name, TRUE);
pcupsFreeDests(nrofdests, dests);
RegCloseKey(hkeyPrinters); RegCloseKey(hkeyPrinters);
return hadprinter; return hadprinter;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment