libtorrunner: fix memory leak in child() error path

This avoids leaking memory in case libtorrunner's child() function fails.
This commit is contained in:
Martin Kepplinger 2018-11-13 10:09:29 +01:00 committed by Nick Mathewson
parent 54d1a2d805
commit 7ba1f39116

View File

@ -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 */