Only free requests in error_route and result_cb

- Also free the cmd pipe that the request was using.