fix mem free bug with printercache - from anders flick

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@597 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Peter Kallden 2004-02-06 10:32:13 +00:00
parent 10ec4b3b70
commit 3032e6b514
2 changed files with 5 additions and 2 deletions

View File

@ -79,6 +79,8 @@ printercache_load_blob(char *printer_name, uint8 ** data)
if (printer_name == NULL) if (printer_name == NULL)
return 0; return 0;
*data = NULL;
home = getenv("HOME"); home = getenv("HOME");
if (home == NULL) if (home == NULL)
return 0; return 0;
@ -160,7 +162,7 @@ printercache_process(STREAM s)
} }
break; break;
/*case 1:*/ /*case 1: */
// TODO: I think this one just tells us what printer is on LPT? but why? // TODO: I think this one just tells us what printer is on LPT? but why?
// //

View File

@ -220,7 +220,8 @@ rdpdr_send_available(void)
rdp_out_unistr(s, printerinfo->printer, printerlen - 2); rdp_out_unistr(s, printerinfo->printer, printerlen - 2);
out_uint8a(s, printerinfo->blob, bloblen); out_uint8a(s, printerinfo->blob, bloblen);
xfree(printerinfo->blob); /* Blob is sent twice if reconnecting */ if (printerinfo->blob)
xfree(printerinfo->blob); /* Blob is sent twice if reconnecting */
break; break;
default: default:
out_uint32(s, 0); out_uint32(s, 0);