BUG/MINOR: backend: assign the wait list after the error check
Commit 85b73e9 ("BUG/MEDIUM: stream: Make sure polling is right on retry.") introduced a possible null dereference on the error path detected by gcc-7. Let's simply assign srv_conn after checking the error and not before. No backport is needed.
This commit is contained in:
parent
9d9ccdbf8b
commit
cde1bc64cb
@ -1167,12 +1167,13 @@ int connect_server(struct stream *s)
|
||||
LIST_DEL(&srv_conn->list);
|
||||
LIST_INIT(&srv_conn->list);
|
||||
}
|
||||
srv_conn->send_wait = send_wait;
|
||||
srv_conn->recv_wait = recv_wait;
|
||||
|
||||
if (!srv_cs)
|
||||
return SF_ERR_RESOURCE;
|
||||
|
||||
srv_conn->send_wait = send_wait;
|
||||
srv_conn->recv_wait = recv_wait;
|
||||
|
||||
if (!(s->flags & SF_ADDR_SET)) {
|
||||
err = assign_server_address(s);
|
||||
if (err != SRV_STATUS_OK)
|
||||
|
Loading…
x
Reference in New Issue
Block a user