[or-cvs] Only free strmap if it is allocated.

Nick Mathewson nickm at seul.org
Fri Aug 26 18:48:15 UTC 2005


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv29111/src/or

Modified Files:
	dirserv.c 
Log Message:
Only free strmap if it is allocated.

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -d -r1.185 -r1.186
--- dirserv.c	26 Aug 2005 18:35:52 -0000	1.185
+++ dirserv.c	26 Aug 2005 18:48:13 -0000	1.186
@@ -1408,7 +1408,9 @@
   clear_cached_dir(&the_runningrouters);
   clear_cached_dir(&cached_directory);
   clear_cached_dir(&cached_runningrouters);
-  strmap_free(cached_v2_networkstatus, free_cached_dir);
-  cached_v2_networkstatus = NULL;
+  if (cached_v2_networkstatus) {
+    strmap_free(cached_v2_networkstatus, free_cached_dir);
+    cached_v2_networkstatus = NULL;
+  }
 }
 



More information about the tor-commits mailing list