mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-10-27 06:31:23 +01:00
BUG/MEDIUM: stick-tables: Don't forget to dec count on failure.
In stksess_new(), if we failed to allocate memory for the new stksess, don't forget to decrement the table entry count, as nobody else will do it for us. An artificially high count could lead to at least purging entries while there is no need to. This should be backported up to 2.8. WIP decrement current on allocation failure
This commit is contained in:
parent
03e9a5a1e7
commit
8d31784c0f
@ -456,7 +456,8 @@ struct stksess *stksess_new(struct stktable *t, struct stktable_key *key)
|
||||
stksess_setkey(t, ts, key);
|
||||
stksess_setkey_shard(t, ts, key);
|
||||
}
|
||||
}
|
||||
} else
|
||||
HA_ATOMIC_DEC(&t->current);
|
||||
|
||||
return ts;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user