From: Martin Kepplinger Date: Tue, 13 Nov 2018 09:09:29 +0000 (+0100) Subject: libtorrunner: fix memory leak in child() error path X-Git-Tag: tor-0.3.3.11~14^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ba1f3911691d211a0297a4ec486d40c3d70bd8c;p=thirdparty%2Ftor.git libtorrunner: fix memory leak in child() error path This avoids leaking memory in case libtorrunner's child() function fails. --- diff --git a/src/tools/tor_runner.c b/src/tools/tor_runner.c index 9ed2ee5775..7c43b0d244 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 */