Fix a memory leak in build_unopened_fourhop

This is a unit-test-only leak, but let's fix it anyway so it doesn't
hide real bugs.

Bug not in any released version of Tor.
This commit is contained in:
Nick Mathewson 2018-01-24 12:08:39 -05:00
parent 37f26aa470
commit 2484d1eb35
1 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,8 @@ build_unopened_fourhop(struct timeval circ_start_time)
onion_append_hop(&or_circ->cpath, fakehop);
onion_append_hop(&or_circ->cpath, fakehop);
tor_free(fakehop);
return or_circ;
}