mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
BUG/MINOR: spoe: do not assume agent->rt is valid on exit
As reported by Christopher, we may call spoe_release_agent() when leaving after an allocation failure or a config parse error. We must not assume agent->rt is valid there as the allocation could have failed. This should be backported to 1.9 and 1.8.
This commit is contained in:
parent
4f03ab06a9
commit
3ddcf7643c
@ -184,8 +184,10 @@ spoe_release_agent(struct spoe_agent *agent)
|
|||||||
LIST_DEL(&grp->list);
|
LIST_DEL(&grp->list);
|
||||||
spoe_release_group(grp);
|
spoe_release_group(grp);
|
||||||
}
|
}
|
||||||
for (i = 0; i < global.nbthread; ++i)
|
if (agent->rt) {
|
||||||
HA_SPIN_DESTROY(&agent->rt[i].lock);
|
for (i = 0; i < global.nbthread; ++i)
|
||||||
|
HA_SPIN_DESTROY(&agent->rt[i].lock);
|
||||||
|
}
|
||||||
free(agent->rt);
|
free(agent->rt);
|
||||||
free(agent);
|
free(agent);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user