[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Allow rend_service_intro_free to get called with NULL
commit 377b5c0510478994fccc4c8931cbce136eb41a5b
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Aug 21 10:34:29 2014 -0400
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)
---
src/or/rendservice.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 629e42c..0633c35 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1446,10 +1446,7 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request,
memwipe(hexcookie, 0, sizeof(hexcookie));
/* Free the parsed cell */
- if (parsed_req) {
- rend_service_free_intro(parsed_req);
- parsed_req = NULL;
- }
+ rend_service_free_intro(parsed_req);
/* Free rp if we must */
if (need_rp_free) extend_info_free(rp);
@@ -1539,7 +1536,6 @@ void
rend_service_free_intro(rend_intro_cell_t *request)
{
if (!request) {
- log_info(LD_BUG, "rend_service_free_intro() called with NULL request!");
return;
}
@@ -1648,7 +1644,7 @@ rend_service_begin_parse_intro(const uint8_t *request,
goto done;
err:
- if (rv) rend_service_free_intro(rv);
+ rend_service_free_intro(rv);
rv = NULL;
if (err_msg_out && !err_msg) {
tor_asprintf(&err_msg,
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits