mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
libtorrunner: fix memory leak in child() error path
This avoids leaking memory in case libtorrunner's child() function fails.
This commit is contained in:
parent
54d1a2d805
commit
7ba1f39116
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user