Browse Source

libtorrunner: fix memory leak in child() error path

This avoids leaking memory in case libtorrunner's child() function fails.
Martin Kepplinger 5 years ago
parent
commit
7ba1f39116
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/tools/tor_runner.c

+ 1 - 0
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 */