Просмотр исходного кода

backport candidate:
Stop leaking part of the descriptor when we run into a particularly
unparseable piece of it. Bugfix on 0.1.2.x.


svn:r11249

Roger Dingledine 18 лет назад
Родитель
Сommit
353abd9830
2 измененных файлов с 3 добавлено и 0 удалено
  1. 2 0
      ChangeLog
  2. 1 0
      src/or/routerparse.c

+ 2 - 0
ChangeLog

@@ -26,6 +26,8 @@ Changes in version 0.2.0.6-alpha - 2007-??-??
       new CookieAuthFile option. Reported by Matt Edman.
     - Fix a minor memory leak when we fail to find enough suitable
       servers to choose a circuit. Bugfix on 0.1.2.x.
+    - Stop leaking part of the descriptor when we run into a particularly
+      unparseable piece of it. Bugfix on 0.1.2.x.
 
   o Minor features (misc):
     - Optionally (if built with -DEXPORTMALLINFO) export the output

+ 1 - 0
src/or/routerparse.c

@@ -2650,6 +2650,7 @@ tokenize_string(const char *start, const char *end, smartlist_t *out,
     tok = get_next_token(s, end, table);
     if (tok->tp == _ERR) {
       log_warn(LD_DIR, "parse error: %s", tok->error);
+      token_free(tok);
       return -1;
     }
     ++counts[tok->tp];