1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

lib: Fix CID 1306765 Unchecked return value from library

This one might be a bit controversial. I don't see from man fcntl how this
could fail. But if it does, we definitely do want to know about it. And here we
don't have any good way to tell our caller, so abort.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Jun 16 19:22:52 CEST 2015 on sn-devel-104
This commit is contained in:
Volker Lendecke 2015-06-16 06:20:56 +00:00
parent 90eefb1779
commit cf598156dd

View File

@ -156,7 +156,13 @@ static void async_connect_cleanup(struct tevent_req *req,
TALLOC_FREE(state->fde);
if (state->fd != -1) {
fcntl(state->fd, F_SETFL, state->old_sockflags);
int ret;
ret = fcntl(state->fd, F_SETFL, state->old_sockflags);
if (ret == -1) {
abort();
}
state->fd = -1;
}
}