mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
CLEANUP: l7-retries: do not test the buffer before calling b_alloc()
The return value is enough now to know if the allocation succeeded or
failed.
This cleanup was already pushed by Willy (f499f50
) but a revert crushed
it. It may be backported to the 2.4 because the original patch was done on
this version.
This commit is contained in:
parent
bf76df12a6
commit
0fe1864f7d
@ -740,9 +740,7 @@ int si_cs_send(struct conn_stream *cs)
|
|||||||
if (!s->txn || (s->txn->req.msg_state != HTTP_MSG_DONE))
|
if (!s->txn || (s->txn->req.msg_state != HTTP_MSG_DONE))
|
||||||
si->flags &= ~SI_FL_L7_RETRY;
|
si->flags &= ~SI_FL_L7_RETRY;
|
||||||
else {
|
else {
|
||||||
if (b_is_null(&si->l7_buffer))
|
if (b_alloc(&si->l7_buffer) == NULL)
|
||||||
b_alloc(&si->l7_buffer);
|
|
||||||
if (b_is_null(&si->l7_buffer))
|
|
||||||
si->flags &= ~SI_FL_L7_RETRY;
|
si->flags &= ~SI_FL_L7_RETRY;
|
||||||
else {
|
else {
|
||||||
memcpy(b_orig(&si->l7_buffer),
|
memcpy(b_orig(&si->l7_buffer),
|
||||||
|
Loading…
Reference in New Issue
Block a user