Since 3.3, handling of idle connections in io handler for muxes/SSL has
been extended. On io completion, connection is not reinserted anymore in
the server list if it is in maintenance mode. Also, private connections
are need race protection as they may be purged : on completion, a
connection is reinserted in its parent session. This operation is
failible as it may require an allocation.
In SSL io tasklet, if a BE connection is not reinserted in its idle pool
for one of the two reasons described above, it is freed instead via MUX
destroy callback. This causes a crash if traces are activated as conn
pointer is not updated.
Fix this by ensuring conn pointer is set to NULL after destroy
invokation.
This must be backported up to 3.3.
if (!session_reinsert_idle_conn(conn->owner, conn)) {
/* session add conn failure */
CALL_MUX_NO_RET(conn->mux, destroy(conn->ctx));
+ conn = NULL;
t = NULL;
}
}
else {
/* Do not store an idle conn if server in maintenance. */
CALL_MUX_NO_RET(conn->mux, destroy(conn->ctx));
+ conn = NULL;
t = NULL;
}
}