mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-12 08:27:24 +00:00
BUG/MINOR: tune.fail-alloc: Don't forget to initialize ret.
In mem_should_fail(), if we don't want to fail the allocation, either because mem_fail_rate is 0, or because we're still initializing, don't forget to initialize ret, or we may return a non-zero value, and fail an allocation we didn't want to fail. This should only affect users that compile with DEBUG_FAIL_ALLOC.
This commit is contained in:
parent
3e451842dc
commit
9c4f08ae39
@ -581,7 +581,7 @@ __decl_hathreads(static HA_SPINLOCK_T mem_fail_lock);
|
||||
|
||||
int mem_should_fail(const struct pool_head *pool)
|
||||
{
|
||||
int ret;
|
||||
int ret = 0;
|
||||
int n;
|
||||
|
||||
if (mem_fail_rate > 0 && !(global.mode & MODE_STARTING)) {
|
||||
|
Loading…
Reference in New Issue
Block a user