s3-spoolss: Improve memory efficiency.
authorSimo Sorce <idra@samba.org>
Fri, 22 Jul 2011 15:59:41 +0000 (11:59 -0400)
committerAndreas Schneider <asn@samba.org>
Wed, 27 Jul 2011 06:49:58 +0000 (08:49 +0200)
commit99e03bee7ae5de37280a4e571caf36b0a8553fae
tree1b383441fdf5d2ba5a99fd98865cd86576b3de3a
parent8831402596fab30f56ce6600c72a575e2e73e4d3
s3-spoolss: Improve memory efficiency.

p->mem_ctx is a relatively long lived context as it will not be freed until
a full request is served. In spoolss we do a lot of operations including
opening new pipes to connect to winreg.
Use more shortlived temporary contexts to avoid leaking a lot of memory on
p->mem_ctx and carrying it around untill all the operations in the current call
are done.

Signed-off-by: Andreas Schneider <asn@samba.org>
source3/rpc_server/spoolss/srv_spoolss_nt.c