void request_return(struct request **request) { struct request *req = *request; if (req == NULL) { return; } INCR(request_metrics, request_free); INCR(request_metrics, request_return); log_vverb("return req %p", req); req->free = true; FREEPOOL_RETURN(req, &reqp, next); *request = NULL; }
/* * Return a single response object */ void response_return(struct response **response) { ASSERT(response != NULL); struct response *rsp = *response; if (rsp == NULL) { return; } INCR(response_metrics, response_free); INCR(response_metrics, response_return); log_vverb("return rsp %p", rsp); rsp->free = true; FREEPOOL_RETURN(rsp, &rspp, next); *response = NULL; }