Explorar o código

Merge branch 'maint-0.3.4' into maint-0.3.5

Nick Mathewson %!s(int64=5) %!d(string=hai) anos
pai
achega
eba989bf0e
Modificáronse 2 ficheiros con 5 adicións e 0 borrados
  1. 3 0
      changes/bug28419
  2. 2 0
      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 - 0
src/tools/tor_runner.c

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