diff options
author | Volker Lendecke <vl@samba.org> | 2009-06-06 00:46:38 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-06-06 10:42:55 +0200 |
commit | a731eb64d9a9415d5df2a385326cc14fcd4481eb (patch) | |
tree | f3cfca61f8a849b5889a1383db7f0dbc44cc4659 /lib | |
parent | 3cd03b229b6f85d5a100ee39229e528641f1c238 (diff) | |
download | samba-a731eb64d9a9415d5df2a385326cc14fcd4481eb.tar.gz samba-a731eb64d9a9415d5df2a385326cc14fcd4481eb.tar.bz2 samba-a731eb64d9a9415d5df2a385326cc14fcd4481eb.zip |
Fix an uninitialized variable read in async_connect_send
Diffstat (limited to 'lib')
-rw-r--r-- | lib/async_req/async_sock.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c index a505fcf465..643eb2d308 100644 --- a/lib/async_req/async_sock.c +++ b/lib/async_req/async_sock.c @@ -223,6 +223,11 @@ struct tevent_req *async_connect_send(TALLOC_CTX *mem_ctx, state->fd = fd; state->sys_errno = 0; + state->old_sockflags = fcntl(fd, F_GETFL, 0); + if (state->old_sockflags == -1) { + goto post_errno; + } + state->address_len = address_len; if (address_len > sizeof(state->address)) { errno = EINVAL; @@ -230,11 +235,6 @@ struct tevent_req *async_connect_send(TALLOC_CTX *mem_ctx, } memcpy(&state->address, address, address_len); - state->old_sockflags = fcntl(fd, F_GETFL, 0); - if (state->old_sockflags == -1) { - goto post_errno; - } - set_blocking(fd, false); state->result = connect(fd, address, address_len); |