diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-01-14 06:36:30 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-01-14 06:36:30 +0000 |
commit | 6bf5d49b8a102b34ca6bb8c54f92c0ba63f4268e (patch) | |
tree | 0c42dfd05b950b649f6e61b5cca75203220a9546 /src | |
parent | d7be03427d1565769989bf309849aecb43650965 (diff) | |
download | tor-6bf5d49b8a102b34ca6bb8c54f92c0ba63f4268e.tar.gz tor-6bf5d49b8a102b34ca6bb8c54f92c0ba63f4268e.zip |
Now that we can hit the end of router_rebuild_store before chunk_list is set, we need to test it before freeing it.
svn:r18101
Diffstat (limited to 'src')
-rw-r--r-- | src/or/routerlist.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 3706769a46..4cc88fd7ce 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -749,8 +749,10 @@ router_rebuild_store(int flags, desc_store_t *store) smartlist_free(signed_descriptors); tor_free(fname); tor_free(fname_tmp); - SMARTLIST_FOREACH(chunk_list, sized_chunk_t *, c, tor_free(c)); - smartlist_free(chunk_list); + if (chunk_list) { + SMARTLIST_FOREACH(chunk_list, sized_chunk_t *, c, tor_free(c)); + smartlist_free(chunk_list); + } return r; } |