diff options
author | Martin Kepplinger <martink@posteo.de> | 2018-11-13 10:09:29 +0100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-11-14 07:49:51 -0500 |
commit | 7ba1f3911691d211a0297a4ec486d40c3d70bd8c (patch) | |
tree | 7def14d4b65d346e0f4624fef80bba83a3bdc79b | |
parent | 54d1a2d80537e9f9a90dcca18c9e616f73809f58 (diff) | |
download | tor-7ba1f3911691d211a0297a4ec486d40c3d70bd8c.tar.gz tor-7ba1f3911691d211a0297a4ec486d40c3d70bd8c.zip |
libtorrunner: fix memory leak in child() error path
This avoids leaking memory in case libtorrunner's child() function fails.
-rw-r--r-- | src/tools/tor_runner.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 */ |