mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-20 00:10:41 -05:00
BUG/MINOR: backend: Fix a possible null pointer dereference
In the function connect_server(), when we are not able to reuse a connection and too many FDs are opened, the variable srv must be defined to kill an idle connection. This patch fixes the issue #257. It must be backported to 2.0
This commit is contained in:
parent
361935aa1e
commit
1dbc4676c6
1 changed files with 1 additions and 1 deletions
|
|
@ -1268,7 +1268,7 @@ int connect_server(struct stream *s)
|
|||
}
|
||||
|
||||
if (((!reuse || (srv_conn && !(srv_conn->flags & CO_FL_CONNECTED)))
|
||||
&& ha_used_fds > global.tune.pool_high_count) && srv->idle_orphan_conns) {
|
||||
&& ha_used_fds > global.tune.pool_high_count) && srv && srv->idle_orphan_conns) {
|
||||
struct connection *tokill_conn;
|
||||
|
||||
/* We can't reuse a connection, and e have more FDs than deemd
|
||||
|
|
|
|||
Loading…
Reference in a new issue