[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r18101: {tor} Now that we can hit the end of router_rebuild_store before c (tor/trunk/src/or)
Author: nickm
Date: 2009-01-14 01:36:30 -0500 (Wed, 14 Jan 2009)
New Revision: 18101
Modified:
tor/trunk/src/or/routerlist.c
Log:
Now that we can hit the end of router_rebuild_store before chunk_list is set, we need to test it before freeing it.
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2009-01-14 06:20:57 UTC (rev 18100)
+++ tor/trunk/src/or/routerlist.c 2009-01-14 06:36:30 UTC (rev 18101)
@@ -749,8 +749,10 @@
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;
}