From 475fb713a9427b54c747a4e71a011c7db29d5e13 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 17 Nov 2000 02:22:35 +0000 Subject: Fix for memory leak when adding driver. Jeremy. (This used to be commit eeab4e0290f9df84025e91c85d27b21e0c02781f) --- source3/rpc_server/srv_spoolss_nt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/rpc_server') 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, ¶m); + status = mod_a_printer(*printer, 2); done: free_a_printer(&printer, 2); + if (param) + free_nt_printer_param(¶m); safe_free(old_param.data); return status; -- cgit