]> git.ipfire.org Git - thirdparty/tor.git/commit
Stop leaking memory in error cases of md parsing
authorNick Mathewson <nickm@torproject.org>
Sat, 26 Apr 2014 16:45:34 +0000 (12:45 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 29 Apr 2014 17:00:00 +0000 (13:00 -0400)
commit65575b0755f64d21d59532bf58e6c27e14086bbb
tree40d9d70ad47837ed1da9532a1401d89aeffe901f
parentef3d7f2f97caf961effd7935dd3231e6bba62ca5
Stop leaking memory in error cases of md parsing

When clearing a list of tokens, it's important to do token_clear()
on them first, or else any keys they contain will leak.  This didn't
leak memory on any of the successful microdescriptor parsing paths,
but it does leak on some failing paths when the failure happens
during tokenization.

Fixes bug 11618; bugfix on 0.2.2.6-alpha.
changes/md_leak_bug [new file with mode: 0644]
src/or/routerparse.c