
When the routing of a queued query fails, the route_stored_query function extract the SQL from and frees the already freed buffer.
When the routing of a queued query fails, the route_stored_query function extract the SQL from and frees the already freed buffer.