summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-06-06 20:44:58 +0000
committerJeremy Allison <jra@samba.org>2000-06-06 20:44:58 +0000
commitd253db1b9a10644940650cc802feb2a509adbaed (patch)
tree5c0309d0f5206eaee7d9769f4ff7c1efc96dd82c /source3/rpc_parse
parent798670db20e67f0544fb8762a9c4813ec0bf5896 (diff)
downloadsamba-d253db1b9a10644940650cc802feb2a509adbaed.tar.gz
samba-d253db1b9a10644940650cc802feb2a509adbaed.tar.bz2
samba-d253db1b9a10644940650cc802feb2a509adbaed.zip
Memory leak fixes.
Jeremy. (This used to be commit 34b63896ab1543936d6b9b382ef6727a161b6bf2)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_spoolss.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 4530f638bc..ea8aa42a45 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -605,6 +605,15 @@ static BOOL spoolss_io_devmode(char *desc, prs_struct *ps, int depth, DEVICEMODE
return True;
}
+void free_spoolss_devmode(DEVICEMODE *devmode)
+{
+ if (devmode == NULL)
+ return;
+
+ safe_free(devmode->private);
+ safe_free(devmode);
+}
+
/*******************************************************************
Read or write a DEVICEMODE container
********************************************************************/
@@ -752,6 +761,11 @@ BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_
return True;
}
+void free_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX *q_u)
+{
+ free_spoolss_devmode(q_u->printer_default.devmode_cont.devmode);
+}
+
/*******************************************************************
* write a structure.
* called from static spoolss_r_open_printer_ex (srv_spoolss.c)