mirror of https://github.com/openssl/openssl.git
QUIC RX: Fix QRX packet handling refactor w.r.t. list refactor
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19703)
This commit is contained in:
parent
6d5d5fc9a9
commit
043a41ddee
|
@ -41,8 +41,8 @@ static ossl_inline int pkt_is_marked(const uint64_t *bitf, size_t pkt_idx)
|
|||
typedef struct rxe_st RXE;
|
||||
|
||||
struct rxe_st {
|
||||
OSSL_LIST_MEMBER(rxe, RXE);
|
||||
OSSL_QRX_PKT pkt;
|
||||
OSSL_LIST_MEMBER(rxe, RXE);
|
||||
size_t data_len, alloc_len, refcount;
|
||||
|
||||
/* Extra fields for per-packet information. */
|
||||
|
@ -381,12 +381,13 @@ static RXE *qrx_resize_rxe(RXE_LIST *rxl, RXE *rxe, size_t n)
|
|||
* data.
|
||||
*/
|
||||
rxe2 = OPENSSL_realloc(rxe, sizeof(RXE) + n);
|
||||
if (rxe2 == NULL || rxe == rxe2) {
|
||||
if (rxe2 == NULL) {
|
||||
/* Resize failed, restore old allocation. */
|
||||
if (p == NULL)
|
||||
ossl_list_rxe_insert_head(rxl, rxe);
|
||||
else
|
||||
ossl_list_rxe_insert_after(rxl, p, rxe);
|
||||
return rxe2;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (p == NULL)
|
||||
|
|
Loading…
Reference in New Issue