summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-09-10 16:06:24 +0200
committerAndreas Schneider <asn@samba.org>2010-09-10 16:10:46 +0200
commitfc1a5dbffb1330bba0e4deebdf18b812ccc1a823 (patch)
treecfb707a2eb7e8f2eaa2fa050d1d3c6c7735b7f9d /source3/rpc_server
parented2c06f9da0401fb95dcc16b4d3a3bd4f27b09f2 (diff)
downloadsamba-fc1a5dbffb1330bba0e4deebdf18b812ccc1a823.tar.gz
samba-fc1a5dbffb1330bba0e4deebdf18b812ccc1a823.tar.bz2
samba-fc1a5dbffb1330bba0e4deebdf18b812ccc1a823.zip
s3-spoolss: Don't leak memory on the session counter list.
Thanks Günther, please check.
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 573faaf979..b5e2ddbdc6 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1462,6 +1462,18 @@ static bool srv_spoolss_drv_upgrade_printer(const char *drivername,
return true;
}
+void srv_spoolss_cleanup(void)
+{
+ struct printer_session_counter *session_counter;
+
+ for (session_counter = counter_list;
+ session_counter != NULL;
+ session_counter = counter_list) {
+ DLIST_REMOVE(counter_list, session_counter);
+ TALLOC_FREE(session_counter);
+ }
+}
+
/**********************************************************************
callback to receive a MSG_PRINTER_DRVUPGRADE message and interate
over all printers, upgrading ones as necessary