summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss_nt.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-11-17 02:22:35 +0000
committerJeremy Allison <jra@samba.org>2000-11-17 02:22:35 +0000
commit475fb713a9427b54c747a4e71a011c7db29d5e13 (patch)
tree201275f216533a9e30675ce35a6f8d21595ab8fb /source3/rpc_server/srv_spoolss_nt.c
parent08036f0f3d3a1dbddc6b3aaba976670e80e47cab (diff)
downloadsamba-475fb713a9427b54c747a4e71a011c7db29d5e13.tar.gz
samba-475fb713a9427b54c747a4e71a011c7db29d5e13.tar.bz2
samba-475fb713a9427b54c747a4e71a011c7db29d5e13.zip
Fix for memory leak when adding driver.
Jeremy. (This used to be commit eeab4e0290f9df84025e91c85d27b21e0c02781f)
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 30acc14904..a04c85368f 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5198,13 +5198,13 @@ uint32 _spoolss_setprinterdata( POLICY_HND *handle,
unlink_specific_param_if_exist(printer->info_2, param);
- if (!add_a_specific_param(printer->info_2, param))
- status = ERROR_INVALID_PARAMETER;
- else
- status = mod_a_printer(*printer, 2);
+ add_a_specific_param(printer->info_2, &param);
+ status = mod_a_printer(*printer, 2);
done:
free_a_printer(&printer, 2);
+ if (param)
+ free_nt_printer_param(&param);
safe_free(old_param.data);
return status;