]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli:smb: Check return code of set_blocking
authorAndreas Schneider <asn@samba.org>
Tue, 24 Nov 2020 16:35:26 +0000 (17:35 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 26 Nov 2020 06:52:41 +0000 (06:52 +0000)
Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/smb/smbXcli_base.c

index 3e020faca3c5d02f7401688419eca73be81de230..df80be6bf16fcfbb4ddee44dcda5485083b89c92 100644 (file)
@@ -338,7 +338,10 @@ struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
-       set_blocking(fd, false);
+       ret = set_blocking(fd, false);
+       if (ret < 0) {
+               goto error;
+       }
        conn->sock_fd = fd;
 
        conn->remote_name = talloc_strdup(conn, remote_name);