浏览代码

Fix a memleak when throwing away some build times

This was introduced in f7e6e852e80c22b40a8f09bc1c85074726d7078e.
Found by Coverity
Sebastian Hahn 16 年之前
父节点
当前提交
e35f9414d6
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/or/circuitbuild.c

+ 2 - 0
src/or/circuitbuild.c

@@ -454,6 +454,8 @@ circuit_build_times_parse_state(circuit_build_times_t *cbt,
                  "Too many build times in state file. "
                  "Stopping short before %d",
                  loaded_cnt+count);
+        SMARTLIST_FOREACH(args, char*, cp, tor_free(cp));
+        smartlist_free(args);
         break;
       }