A recent patch has implemented caching of QUIC token received from a
NEW_TOKEN frame into the server cache. This value is stored per thread
into a <quic_retry_token> field.
This field is an ist, first set to an empty string. Via
qc_try_store_new_token(), it is reallocated to fit the size of the newly
stored token. Prior to this patch, the field was never freed so this
causes a memory leak.
Fix this by using istfree() on <quic_retry_token> field during
srv_drop().
No need to backport.
struct server *srv_drop(struct server *srv)
{
struct server *next = NULL;
+ int i __maybe_unused;
if (!srv)
goto end;
task_destroy(srv->srvrq_check);
free(srv->id);
+#ifdef USE_QUIC
+ for (i = 0; i < global.nbthread; i++)
+ istfree(&srv->per_thr[i].quic_retry_token);
+#endif
srv_free_params(srv);
HA_SPIN_DESTROY(&srv->lock);