Explorar o código

Fix a memleak when throwing away some build times

This was introduced in f7e6e852e80c22b40a8f09bc1c85074726d7078e.
Found by Coverity
Sebastian Hahn %!s(int64=16) %!d(string=hai) anos
pai
achega
e35f9414d6
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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;
       }