commit 7ba1f3911691d211a0297a4ec486d40c3d70bd8c Author: Martin Kepplinger martink@posteo.de Date: Tue Nov 13 10:09:29 2018 +0100
libtorrunner: fix memory leak in child() error path
This avoids leaking memory in case libtorrunner's child() function fails. --- src/tools/tor_runner.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/tools/tor_runner.c b/src/tools/tor_runner.c index 9ed2ee577..7c43b0d24 100644 --- a/src/tools/tor_runner.c +++ b/src/tools/tor_runner.c @@ -93,6 +93,7 @@ child(const tor_main_configuration_t *cfg) int rv = execv(BINDIR "/tor", args);
if (rv < 0) { + free(args); exit(254); } else { abort(); /* Unreachable */
tor-commits@lists.torproject.org