Browse Source

Fix memleak when failing to parse a CSV_INTERVAL.

Fixes bug 30894; bugfix on 0.3.4.1-alpha
Nick Mathewson 4 years ago
parent
commit
4ab1d1c0c4
2 changed files with 5 additions and 0 deletions
  1. 4 0
      changes/bug30894
  2. 1 0
      src/app/config/confparse.c

+ 4 - 0
changes/bug30894

@@ -0,0 +1,4 @@
+  o Minor bugfixes (memory leaks):
+    - Fix a trivial memory leak when parsing an invalid value
+      from a download schedule in the configuration. Fixes bug
+      30894; bugfix on 0.3.4.1-alpha.

+ 1 - 0
src/app/config/confparse.c

@@ -225,6 +225,7 @@ config_assign_value(const config_format_t *fmt, void *options,
       tor_asprintf(msg,
           "Interval '%s %s' is malformed or out of bounds.",
           c->key, c->value);
+      tor_free(tmp);
       return -1;
     }
     *(int *)lvalue = i;