lib: Fix CID 1405493 Error handling issues (CHECKED_RETURN)
authorVolker Lendecke <vl@samba.org>
Tue, 25 Apr 2017 15:32:43 +0000 (17:32 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 25 Apr 2017 21:07:25 +0000 (23:07 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr 25 23:07:25 CEST 2017 on sn-devel-144

source3/lib/ctdbd_conn.c

index c629d3c..053d1b5 100644 (file)
@@ -440,7 +440,12 @@ static int ctdb_read_req(struct ctdbd_connection *conn, uint32_t reqid,
  **/
 int ctdbd_setup_fde(struct ctdbd_connection *conn, struct tevent_context *ev)
 {
-       set_blocking(conn->fd, false);
+       int ret;
+
+       ret = set_blocking(conn->fd, false);
+       if (ret == -1) {
+               return errno;
+       }
 
        conn->fde = tevent_add_fd(ev,
                                  conn,