diff options
Diffstat (limited to 'source4/libcli/cliconnect.c')
-rw-r--r-- | source4/libcli/cliconnect.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c index 00c5012074..c344ece385 100644 --- a/source4/libcli/cliconnect.c +++ b/source4/libcli/cliconnect.c @@ -32,13 +32,9 @@ BOOL smbcli_socket_connect(struct smbcli_state *cli, const char *server) { struct smbcli_socket *sock; - sock = smbcli_sock_init(cli, NULL); - if (!sock) return False; + sock = smbcli_sock_connect_byname(server, 0, NULL, NULL); - if (!smbcli_sock_connect_byname(sock, server, 0)) { - talloc_free(sock); - return False; - } + if (sock == NULL) return False; cli->transport = smbcli_transport_init(sock, cli, True); if (!cli->transport) { |