summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-04-27 12:06:25 -0700
committerJeremy Allison <jra@samba.org>2011-04-27 12:06:25 -0700
commit1815f0298f33c949f78e181477e8474a37663ccd (patch)
tree89e0274af9afe5c814fcce17f291791bcbc2a5f6 /source3/winbindd
parent66b26195d21f0889e7ccd0de25a5827bb3722196 (diff)
downloadsamba-1815f0298f33c949f78e181477e8474a37663ccd.tar.gz
samba-1815f0298f33c949f78e181477e8474a37663ccd.tar.bz2
samba-1815f0298f33c949f78e181477e8474a37663ccd.zip
Remove fstrings from client struct. Properly talloc strings (ensuring we never end up with a NULL pointer).
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_cm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 166e2eda52..0bc791f451 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -816,7 +816,12 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
(*cli)->timeout = 10000; /* 10 seconds */
(*cli)->fd = sockfd;
- fstrcpy((*cli)->desthost, controller);
+ (*cli)->desthost = talloc_strdup((*cli), controller);
+ if ((*cli)->desthost == NULL) {
+ result = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
+
(*cli)->use_kerberos = True;
peeraddr_len = sizeof(peeraddr);