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

[or-cvs] don"t crash now that LongLivedPorts can be null



Update of /home2/or/cvsroot/tor/src/common
In directory moria:/home/arma/work/onion/cvs/tor/src/common

Modified Files:
	container.c 
Log Message:
don't crash now that LongLivedPorts can be null


Index: container.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/common/container.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- container.c	22 Jul 2005 21:12:10 -0000	1.32
+++ container.c	8 Sep 2005 06:47:27 -0000	1.33
@@ -149,6 +149,7 @@
 
 int smartlist_string_isin(const smartlist_t *sl, const char *element) {
   int i;
+  if (!sl) return 0;
   for (i=0; i < sl->num_used; i++)
     if (strcmp((const char*)sl->list[i],element)==0)
       return 1;