s4:libcli/raw: make sure smbcli_transport_connect_send/recv correctly cleanup on...
authorStefan Metzmacher <metze@samba.org>
Thu, 28 May 2015 12:25:27 +0000 (14:25 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 12 Jun 2015 15:08:17 +0000 (17:08 +0200)
commitdd037b0be4ed2df7239cb61bd3d4bb868bb09126
treee31b84f84715a1c1dfe6dffa8359f0582a297805
parent36b97d0bb9fe004f3d8a500f3af83dff34f86d7b
s4:libcli/raw: make sure smbcli_transport_connect_send/recv correctly cleanup on error

We need to make sure that we remove any pending writev_send or read_smb_send
request before closing the socket fd. As a side effect we always close the
socket fd if we don't return success for any any reason.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/libcli/raw/clisocket.c