summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss_nt.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index da5b3e960f..7f7a75fc5c 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -3677,7 +3677,8 @@ static uint32 enumprinterdrivers_level1(fstring servername, fstring architecture
DEBUGADD(5,("\tdriver: [%s]\n", list[i]));
ZERO_STRUCT(driver);
get_a_printer_driver(&driver, 3, list[i], architecture, version);
- fill_printer_driver_info_1(&(driver_info_1[*returned+i]), driver, servername, architecture );
+ fill_printer_driver_info_1(&driver_info_1[*returned+i], driver, servername, architecture );
+ free_a_printer_driver(driver, 3);
}
*returned+=ndrivers;
@@ -3687,7 +3688,7 @@ static uint32 enumprinterdrivers_level1(fstring servername, fstring architecture
/* check the required size. */
for (i=0; i<*returned; i++) {
DEBUGADD(6,("adding driver [%d]'s size\n",i));
- *needed += spoolss_size_printer_driver_info_1(&(driver_info_1[i]));
+ *needed += spoolss_size_printer_driver_info_1(&driver_info_1[i]);
}
if (!alloc_buffer_size(buffer, *needed)) {
@@ -3698,7 +3699,7 @@ static uint32 enumprinterdrivers_level1(fstring servername, fstring architecture
/* fill the buffer with the form structures */
for (i=0; i<*returned; i++) {
DEBUGADD(6,("adding driver [%d] to buffer\n",i));
- new_smb_io_printer_driver_info_1("", buffer, &(driver_info_1[i]), 0);
+ new_smb_io_printer_driver_info_1("", buffer, &driver_info_1[i], 0);
}
safe_free(driver_info_1);
@@ -3747,7 +3748,8 @@ static uint32 enumprinterdrivers_level2(fstring servername, fstring architecture
DEBUGADD(5,("\tdriver: [%s]\n", list[i]));
ZERO_STRUCT(driver);
get_a_printer_driver(&driver, 3, list[i], architecture, version);
- fill_printer_driver_info_2(&(driver_info_2[*returned+i]), driver, servername);
+ fill_printer_driver_info_2(&driver_info_2[*returned+i], driver, servername);
+ free_a_printer_driver(driver, 3);
}
*returned+=ndrivers;
@@ -3817,7 +3819,8 @@ static uint32 enumprinterdrivers_level3(fstring servername, fstring architecture
DEBUGADD(5,("\tdriver: [%s]\n", list[i]));
ZERO_STRUCT(driver);
get_a_printer_driver(&driver, 3, list[i], architecture, version);
- fill_printer_driver_info_3(&(driver_info_3[*returned+i]), driver, servername);
+ fill_printer_driver_info_3(&driver_info_3[*returned+i], driver, servername);
+ free_a_printer_driver(driver, 3);
}
*returned+=ndrivers;