summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-12-18 16:32:57 +0100
committerMichael Adam <obnox@samba.org>2007-12-18 16:33:35 +0100
commit1394b91888f4e2f74ebbe462e896e49079d0146d (patch)
treefc994302263909c8292fdf795868cd80ec07431e
parentb940e473dd15a8d6d670d241a7c9010791b66b1e (diff)
downloadsamba-1394b91888f4e2f74ebbe462e896e49079d0146d.tar.gz
samba-1394b91888f4e2f74ebbe462e896e49079d0146d.tar.bz2
samba-1394b91888f4e2f74ebbe462e896e49079d0146d.zip
Fix an error when accessing unallocated sid in error path.
Michael (This used to be commit 2a0585d3093265a499c9fef60d500059f79b4112)
-rw-r--r--source3/rpcclient/cmd_samr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index dae6c42bf2..601e62fe94 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -2114,11 +2114,11 @@ static NTSTATUS cmd_samr_lookup_domain(struct rpc_pipe_client *cli,
result = rpccli_samr_lookup_domain(
cli, mem_ctx, &connect_pol, domain_name, &sid);
- sid_to_fstring(sid_string,&sid);
-
- if (NT_STATUS_IS_OK(result))
+ if (NT_STATUS_IS_OK(result)) {
+ sid_to_fstring(sid_string,&sid);
printf("SAMR_LOOKUP_DOMAIN: Domain Name: %s Domain SID: %s\n",
domain_name,sid_string);
+ }
rpccli_samr_close(cli, mem_ctx, &domain_pol);
rpccli_samr_close(cli, mem_ctx, &connect_pol);