Aurimas Fischer : winspool.drv: Properly free destinations list returned by CUPS.
Alexandre Julliard
julliard at winehq.org
Fri Feb 20 12:49:34 CST 2009
Module: wine
Branch: master
Commit: 7ea4fcb7c65e5034d5948c10d82da391c6bdf8af
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7ea4fcb7c65e5034d5948c10d82da391c6bdf8af
Author: Aurimas Fischer <aurimas at gmail.com>
Date: Thu Feb 19 19:21:07 2009 +0200
winspool.drv: Properly free destinations list returned by CUPS.
---
dlls/winspool.drv/info.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index df6bf91..92bbc94 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -460,6 +460,7 @@ static BOOL add_printer_driver(const char *name)
}
#ifdef SONAME_LIBCUPS
+static typeof(cupsFreeDests) *pcupsFreeDests;
static typeof(cupsGetDests) *pcupsGetDests;
static typeof(cupsGetPPD) *pcupsGetPPD;
static typeof(cupsPrintFile) *pcupsPrintFile;
@@ -486,6 +487,7 @@ static BOOL CUPS_LoadPrinters(void)
p##x = wine_dlsym(cupshandle, #x, NULL,0); \
if (!p##x) return FALSE;
+ DYNCUPS(cupsFreeDests);
DYNCUPS(cupsGetPPD);
DYNCUPS(cupsGetDests);
DYNCUPS(cupsPrintFile);
@@ -566,6 +568,7 @@ static BOOL CUPS_LoadPrinters(void)
}
if (hadprinter & !haddefault)
WINSPOOL_SetDefaultPrinter(dests[0].name, dests[0].name, TRUE);
+ pcupsFreeDests(nrofdests, dests);
RegCloseKey(hkeyPrinters);
return hadprinter;
}
More information about the wine-cvs
mailing list