Browse Source

Merge branch 'maint-0.3.3' into maint-0.3.4

Nick Mathewson 5 years ago
parent
commit
1043532a51
2 changed files with 5 additions and 1 deletions
  1. 3 0
      changes/bug28419
  2. 2 1
      src/tools/tor_runner.c

+ 3 - 0
changes/bug28419

@@ -0,0 +1,3 @@
+  o Minor bugfixes (memory leaks):
+    - Fix a harmless memory leak in libtorrunner.a. Fixes bug 28419;
+      bugfix on 0.3.3.1-alpha.  Patch from Martin Kepplinger.

+ 2 - 1
src/tools/tor_runner.c

@@ -80,6 +80,7 @@ tor_run_main(const tor_main_configuration_t *cfg)
 /* circumlocution to avoid getting warned about calling calloc instead of
  * tor_calloc. */
 #define real_calloc calloc
+#define real_free free
 
 static void
 child(const tor_main_configuration_t *cfg)
@@ -93,9 +94,9 @@ child(const tor_main_configuration_t *cfg)
   int rv = execv(BINDIR "/tor", args);
 
   if (rv < 0) {
+    real_free(args);
     exit(254);
   } else {
     abort(); /* Unreachable */
   }
 }
-