winspool: fix memory leak (found by Smatch).
Lionel Debroux
lionel_debroux at yahoo.fr
Fri Dec 14 07:56:57 CST 2007
---
dlls/winspool.drv/info.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index 236d77d..e510496 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -683,7 +683,7 @@ PRINTCAP_ParseEntry(const char *pent, BOOL isfirst) {
ERROR_SUCCESS) {
ERR("Can't create Printers key\n");
ret = FALSE;
- goto end;
+ goto end2;
}
if(RegOpenKeyA(hkeyPrinters, devname, &hkeyPrinter) == ERROR_SUCCESS) {
/* Printer already in registry, delete the tag added in WINSPOOL_LoadSystemPrinters
@@ -723,6 +723,7 @@ PRINTCAP_ParseEntry(const char *pent, BOOL isfirst) {
if (isfirst || set_default)
WINSPOOL_SetDefaultPrinter(devname,name,TRUE);
+ end2:
HeapFree(GetProcessHeap(), 0, port);
end:
HeapFree(GetProcessHeap(), 0, name);
--
1.5.3.4
--------------080302040002020809000903--
More information about the wine-patches
mailing list