summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-04-25 00:46:24 +0000
committerAndrew Tridgell <tridge@samba.org>2000-04-25 00:46:24 +0000
commit4a57f9763a7b8ab5114bbecf9e1096b66174137f (patch)
tree72342c0fc137830232cf69b129c58d246bfd01c1
parent84f65e6be63307373949bc4490fcd40b34794903 (diff)
downloadsamba-4a57f9763a7b8ab5114bbecf9e1096b66174137f.tar.gz
samba-4a57f9763a7b8ab5114bbecf9e1096b66174137f.tar.bz2
samba-4a57f9763a7b8ab5114bbecf9e1096b66174137f.zip
fixed a memory leak of devmode in spoolss
this stuff is screaming out for talloc() rather than malloc/free (This used to be commit e9576124cbe8322ed7bee9f4e72b5d1753ee0bac)
-rwxr-xr-xsource3/rpc_server/srv_spoolss.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index aaa87fe6ff..da7db8e557 100755
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -50,6 +50,9 @@ static BOOL api_spoolss_open_printer_ex(prs_struct *data, prs_struct *rdata)
q_u.user_switch, q_u.user_ctr,
&r_u.handle);
+ /* we _really_ need to switch to talloc() */
+ safe_free(q_u.printer_default.devmode_cont.devmode);
+
if (!spoolss_io_r_open_printer_ex("",&r_u,rdata,0)){
DEBUG(0,("spoolss_io_r_open_printer_ex: unable to marshall SPOOL_R_OPEN_PRINTER_EX.\n"));
return False;