mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Switch to a safer FREE_AND_NULL implementation
This one only evaluates the input once, so it cannot mess up even if there are side effects.
This commit is contained in:
+1
-1
@@ -616,7 +616,7 @@ test_rend_fns(void *arg)
|
||||
done:
|
||||
if (descs) {
|
||||
for (i = 0; i < smartlist_len(descs); i++)
|
||||
rend_encoded_v2_service_descriptor_free(smartlist_get(descs, i));
|
||||
rend_encoded_v2_service_descriptor_free_(smartlist_get(descs, i));
|
||||
smartlist_free(descs);
|
||||
}
|
||||
if (parsed)
|
||||
|
||||
+1
-1
@@ -567,7 +567,7 @@ test_dir_routerinfo_parsing(void *arg)
|
||||
static void
|
||||
routerinfo_free_wrapper_(void *arg)
|
||||
{
|
||||
routerinfo_free(arg);
|
||||
routerinfo_free_(arg);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user