mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Allow rend_service_intro_free to get called with NULL
(We allowed it previously, but produced an LD_BUG message when it happened, which is not consistent Also, remove inconsistent NULL checks before calling rend_service_intro_free. (Removing the check is for CID 718613)
This commit is contained in:
parent
c9cac69ac6
commit
377b5c0510
@ -1446,10 +1446,7 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request,
|
|||||||
memwipe(hexcookie, 0, sizeof(hexcookie));
|
memwipe(hexcookie, 0, sizeof(hexcookie));
|
||||||
|
|
||||||
/* Free the parsed cell */
|
/* Free the parsed cell */
|
||||||
if (parsed_req) {
|
|
||||||
rend_service_free_intro(parsed_req);
|
rend_service_free_intro(parsed_req);
|
||||||
parsed_req = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Free rp if we must */
|
/* Free rp if we must */
|
||||||
if (need_rp_free) extend_info_free(rp);
|
if (need_rp_free) extend_info_free(rp);
|
||||||
@ -1539,7 +1536,6 @@ void
|
|||||||
rend_service_free_intro(rend_intro_cell_t *request)
|
rend_service_free_intro(rend_intro_cell_t *request)
|
||||||
{
|
{
|
||||||
if (!request) {
|
if (!request) {
|
||||||
log_info(LD_BUG, "rend_service_free_intro() called with NULL request!");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1648,7 +1644,7 @@ rend_service_begin_parse_intro(const uint8_t *request,
|
|||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
if (rv) rend_service_free_intro(rv);
|
rend_service_free_intro(rv);
|
||||||
rv = NULL;
|
rv = NULL;
|
||||||
if (err_msg_out && !err_msg) {
|
if (err_msg_out && !err_msg) {
|
||||||
tor_asprintf(&err_msg,
|
tor_asprintf(&err_msg,
|
||||||
|
Loading…
Reference in New Issue
Block a user