if (r->status == HTTP_OK) {
cs->state = CONN_STATE_HANDLER;
ap_process_async_request(r);
+ /* After the call to ap_process_request, the
+ * request pool may have been deleted. We set
+ * r=NULL here to ensure that any dereference
+ * of r that might be added later in this function
+ * will result in a segfault immediately instead
+ * of nondeterministic failures later.
+ */
+ r = NULL;
}
- if (ap_extended_status)
- ap_increment_counts(c->sbh, r);
-
if (cs->state != CONN_STATE_WRITE_COMPLETION) {
/* Something went wrong; close the connection */
cs->state = CONN_STATE_LINGER;
if (r->status == HTTP_OK) {
cs->state = CONN_STATE_HANDLER;
ap_process_request(r);
+ /* After the call to ap_process_request, the
+ * request pool will have been deleted. We set
+ * r=NULL here to ensure that any dereference
+ * of r that might be added later in this function
+ * will result in a segfault immediately instead
+ * of nondeterministic failures later.
+ */
+ r = NULL;
}
-
- if (ap_extended_status)
- ap_increment_counts(c->sbh, r);
-
+
if (c->keepalive != AP_CONN_KEEPALIVE || c->aborted)
break;
- ap_update_child_status(c->sbh, SERVER_BUSY_KEEPALIVE, r);
+ ap_update_child_status(c->sbh, SERVER_BUSY_KEEPALIVE, NULL);
if (ap_graceful_stop_signalled())
break;
#include "httpd.h"
#include "http_request.h"
#include "http_protocol.h"
+#include "scoreboard.h"
static apr_status_t eor_bucket_read(apr_bucket *b, const char **str,
apr_size_t *len, apr_read_type_e block)
request_rec *r = (request_rec *)data;
if (r != NULL) {
ap_run_log_transaction(r);
+ if (ap_extended_status) {
+ ap_increment_counts(r->connection->sbh, r);
+ }
apr_pool_destroy(r->pool);
}
}