- Free the reply buffer when we destroy the request, thus avoiding the
double-free. If we ever move to an event model where we don't put the
ptlrpc_main() request on the stack, be careful that we don't free an outgoing
reply buffer before it's sent!
obd_cleanup_obdo_cache();
obd_sysctl_clean();
- CDEBUG(D_MALLOC, "CLASS mem used %ld\n", obd_memory);
+ if (obd_memory)
+ CERROR("obd memory leaked: %ld bytes\n", obd_memory);
obd_init_magic = 0;
EXIT;
}
void ptlrpc_free_req(struct ptlrpc_request *request)
{
+ if (request->rq_repbuf != NULL)
+ OBD_FREE(request->rq_repbuf, request->rq_replen);
OBD_FREE(request, sizeof(*request));
}