[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [tor/master] Fix a memleak when throwing away some build times



Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date: Sat, 10 Oct 2009 13:41:44 +0200
Subject: Fix a memleak when throwing away some build times
Commit: e35f9414d6853cb9a245797190296e9d1561761a

This was introduced in f7e6e852e80c22b40a8f09bc1c85074726d7078e.
Found by Coverity
---
 src/or/circuitbuild.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 54edccc..fbdbb85 100644
--- a/src/or/circuitbuild.c
+++ b/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;
       }
 
-- 
1.5.6.5