diff options
author | Volker Lendecke <vl@samba.org> | 2009-02-13 10:11:57 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-02-13 10:20:57 +0100 |
commit | 83c2f028d81a6b481ecd439494dd7c52b1e1b1ff (patch) | |
tree | 1f59a09f8337b5d4312e2f7adb34551c642e03ad /source3 | |
parent | 6e19b22c5a208351e570fc09fbf2f0b9eb975b2e (diff) | |
download | samba-83c2f028d81a6b481ecd439494dd7c52b1e1b1ff.tar.gz samba-83c2f028d81a6b481ecd439494dd7c52b1e1b1ff.tar.bz2 samba-83c2f028d81a6b481ecd439494dd7c52b1e1b1ff.zip |
Fix Coverity ID 742 (RESOURCE_LEAK)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net_rpc_join.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index 0c363d373e..1c45d0c515 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -481,7 +481,6 @@ done: **/ int net_rpc_testjoin(struct net_context *c, int argc, const char **argv) { - char *domain = smb_xstrdup(c->opt_target_workgroup); NTSTATUS nt_status; if (c->display_usage) { @@ -492,15 +491,13 @@ int net_rpc_testjoin(struct net_context *c, int argc, const char **argv) } /* Display success or failure */ - nt_status = net_rpc_join_ok(c, domain, NULL, NULL); + nt_status = net_rpc_join_ok(c, c->opt_target_workgroup, NULL, NULL); if (!NT_STATUS_IS_OK(nt_status)) { fprintf(stderr,"Join to domain '%s' is not valid: %s\n", - domain, nt_errstr(nt_status)); - free(domain); + c->opt_target_workgroup, nt_errstr(nt_status)); return -1; } - printf("Join to '%s' is OK\n",domain); - free(domain); + printf("Join to '%s' is OK\n", c->opt_target_workgroup); return 0; } |