Although it's totally non-obvious, there is no memory leak after #6899. When rep->data is allocated in process_chpw_request(), ret should always be 0 (this is the non-obvious part). So when a non-zero return happens, ret->data will be NULL, and the new code in #6899 will free the container.