summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authortodd stecher <todd.stecher@gmail.com>2009-01-19 15:09:51 -0800
committerSteven Danneman <steven.danneman@isilon.com>2009-01-21 17:13:03 -0800
commit989ad44d32c2e77972a966d91f1813b0b929f83b (patch)
treebb7a41c961fe974f464f7ce2a27ca3bf055187bf /source3/rpc_server
parente9615b43b4dc7037da7bc274d720b8e54c7f85bc (diff)
downloadsamba-989ad44d32c2e77972a966d91f1813b0b929f83b.tar.gz
samba-989ad44d32c2e77972a966d91f1813b0b929f83b.tar.bz2
samba-989ad44d32c2e77972a966d91f1813b0b929f83b.zip
Memory leaks and other fixes found by Coverity
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_pipe.c4
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c3
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 4f78d69bcc..343342a06c 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -706,7 +706,7 @@ static int rpc_lookup_size;
bool api_pipe_bind_auth3(pipes_struct *p, prs_struct *rpc_in_p)
{
RPC_HDR_AUTH auth_info;
- uint32 pad;
+ uint32 pad = 0;
DATA_BLOB blob;
ZERO_STRUCT(blob);
@@ -1839,6 +1839,8 @@ bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p)
return False;
}
+ ZERO_STRUCT(hdr_rb);
+
DEBUG(5,("api_pipe_alter_context: decode request. %d\n", __LINE__));
/* decode the alter context request */
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 123cbf9335..ba2fe774b8 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -9927,7 +9927,8 @@ WERROR _spoolss_xcvdataport(pipes_struct *p, SPOOL_Q_XCVDATAPORT *q_u, SPOOL_R_X
/* Allocate the outgoing buffer */
- rpcbuf_init( &r_u->outdata, q_u->offered, p->mem_ctx );
+ if (!rpcbuf_init( &r_u->outdata, q_u->offered, p->mem_ctx ))
+ return WERR_NOMEM;
switch ( Printer->printer_type ) {
case SPLHND_PORTMON_TCP:
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c
index 3b044944d9..33bf3d0098 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -580,7 +580,6 @@ WERROR _svcctl_QueryServiceStatusEx(pipes_struct *p,
/* we have to set the outgoing buffer size to the same as the
incoming buffer size (even in the case of failure) */
-
*r->out.bytes_needed = r->in.buf_size;
switch ( r->in.info_level ) {
@@ -736,7 +735,6 @@ WERROR _svcctl_QueryServiceConfig2W(pipes_struct *p,
/* we have to set the outgoing buffer size to the same as the
incoming buffer size (even in the case of failure */
-
*r->out.bytes_needed = r->in.buf_size;
switch ( r->in.info_level ) {