summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-11-12 13:56:33 -0800
committerJeremy Allison <jra@samba.org>2009-11-12 13:56:33 -0800
commit5363d6e62c2d4d3275e78d04c48835524c54f620 (patch)
treea7570c052a33168acbf0ce74b9685a3ba7bf6355 /source3/utils
parent6747a91ca0c350374c54bac5892cf96e5aed029f (diff)
downloadsamba-5363d6e62c2d4d3275e78d04c48835524c54f620.tar.gz
samba-5363d6e62c2d4d3275e78d04c48835524c54f620.tar.bz2
samba-5363d6e62c2d4d3275e78d04c48835524c54f620.zip
Ensure all callers to the rpc_client/cli_pipe functions correctly
initialize return variables. Jeremy.
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c4
-rw-r--r--source3/utils/net_rpc_shell.c2
-rw-r--r--source3/utils/net_util.c2
-rw-r--r--source3/utils/smbcacls.c2
-rw-r--r--source3/utils/smbtree.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 10873cacbd..031a338835 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1626,8 +1626,8 @@ static int net_ads_printer_publish(struct net_context *c, int argc, const char *
ADS_STRUCT *ads;
ADS_STATUS rc;
const char *servername, *printername;
- struct cli_state *cli;
- struct rpc_pipe_client *pipe_hnd;
+ struct cli_state *cli = NULL;
+ struct rpc_pipe_client *pipe_hnd = NULL;
struct sockaddr_storage server_ss;
NTSTATUS nt_status;
TALLOC_CTX *mem_ctx = talloc_init("net_ads_printer_publish");
diff --git a/source3/utils/net_rpc_shell.c b/source3/utils/net_rpc_shell.c
index 5e0f150371..39ef1cedcd 100644
--- a/source3/utils/net_rpc_shell.c
+++ b/source3/utils/net_rpc_shell.c
@@ -69,7 +69,7 @@ static NTSTATUS net_sh_run(struct net_context *c,
int argc, const char **argv)
{
TALLOC_CTX *mem_ctx;
- struct rpc_pipe_client *pipe_hnd;
+ struct rpc_pipe_client *pipe_hnd = NULL;
NTSTATUS status;
mem_ctx = talloc_new(ctx);
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c
index d0d1fc0421..eaa2125e34 100644
--- a/source3/utils/net_util.c
+++ b/source3/utils/net_util.c
@@ -28,7 +28,7 @@ NTSTATUS net_rpc_lookup_name(struct net_context *c,
const char **ret_name, DOM_SID *ret_sid,
enum lsa_SidType *ret_type)
{
- struct rpc_pipe_client *lsa_pipe;
+ struct rpc_pipe_client *lsa_pipe = NULL;
struct policy_handle pol;
NTSTATUS result = NT_STATUS_OK;
const char **dom_names;
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index dfc2a92031..eefe4fe77c 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -70,7 +70,7 @@ static NTSTATUS cli_lsa_lookup_sid(struct cli_state *cli,
char **domain, char **name)
{
uint16 orig_cnum = cli->cnum;
- struct rpc_pipe_client *p;
+ struct rpc_pipe_client *p = NULL;
struct policy_handle handle;
NTSTATUS status;
TALLOC_CTX *frame = talloc_stackframe();
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c
index 02001f0abb..717ce65006 100644
--- a/source3/utils/smbtree.c
+++ b/source3/utils/smbtree.c
@@ -148,7 +148,7 @@ static bool get_rpc_shares(struct cli_state *cli,
void *state)
{
NTSTATUS status;
- struct rpc_pipe_client *pipe_hnd;
+ struct rpc_pipe_client *pipe_hnd = NULL;
TALLOC_CTX *mem_ctx;
WERROR werr;
struct srvsvc_NetShareInfoCtr info_ctr;