summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-06-01 21:52:49 +0000
committerJeremy Allison <jra@samba.org>2000-06-01 21:52:49 +0000
commit8ff6458a3e568e759969fd1a9c827c4b47008cfb (patch)
tree8f61d6a1f60ad1a407fed09c4e543b7aefb73741 /source3/rpc_server
parentb9fedcb2de5612bdb4e763fe0788e1a4a9c16d33 (diff)
downloadsamba-8ff6458a3e568e759969fd1a9c827c4b47008cfb.tar.gz
samba-8ff6458a3e568e759969fd1a9c827c4b47008cfb.tar.bz2
samba-8ff6458a3e568e759969fd1a9c827c4b47008cfb.zip
More insure found memory leak and corruption fixes.
Jeremy. (This used to be commit 3cdcfa6325b9cd2d7f7c90c4b2d1c6ec73fc2f6d)
Diffstat (limited to 'source3/rpc_server')
-rwxr-xr-xsource3/rpc_server/srv_spoolss.c3
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 74901efa78..2513fe91e6 100755
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -833,9 +833,12 @@ static BOOL api_spoolss_addprinterdriver(prs_struct *data, prs_struct *rdata)
if(!spoolss_io_r_addprinterdriver("", &r_u, rdata, 0)) {
DEBUG(0,("spoolss_io_r_addprinterdriver: unable to marshall SPOOL_R_ADDPRINTERDRIVER.\n"));
+ free_spoolss_q_addprinterdriver(&q_u);
return False;
}
+ free_spoolss_q_addprinterdriver(&q_u);
+
return True;
}
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index f181585c84..b77deca158 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -3917,14 +3917,12 @@ uint32 _spoolss_addprinterdriver( const UNISTR2 *server_name,
#ifdef RELIES_ON_SMBD_FUNCTIONS_LINKED_INTO_SPOOLSSD
if ((err = modify_driver_heirarchy(&driver, level)) != 0) {
- safe_free(driver.info_3);
- safe_free(driver.info_6);
+ free_a_printer_driver(driver, level);
return err;
}
#endif
- safe_free(driver.info_3);
- safe_free(driver.info_6);
+ free_a_printer_driver(driver, level);
return NT_STATUS_NO_PROBLEMO;
}