mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 07:07:52 +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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue