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

[or-cvs] r17668: {tor} Avoid nop call to control_event_or_authdir_new_descriptor th (tor/trunk/src/or)



Author: nickm
Date: 2008-12-17 23:45:47 -0500 (Wed, 17 Dec 2008)
New Revision: 17668

Modified:
   tor/trunk/src/or/dirserv.c
Log:
Avoid nop call to control_event_or_authdir_new_descriptor that makes coverity think we are dereferencing a null pointer.  It is safe, I think, but entirely too clever for our own good.

Modified: tor/trunk/src/or/dirserv.c
===================================================================
--- tor/trunk/src/or/dirserv.c	2008-12-18 04:27:23 UTC (rev 17667)
+++ tor/trunk/src/or/dirserv.c	2008-12-18 04:45:47 UTC (rev 17668)
@@ -726,7 +726,8 @@
     tor_free(desc);
   } else {
     smartlist_t *changed;
-    control_event_or_authdir_new_descriptor("ACCEPTED", desc, desclen, *msg);
+    if (desc)
+      control_event_or_authdir_new_descriptor("ACCEPTED", desc, desclen, *msg);
 
     changed = smartlist_create();
     smartlist_add(changed, ri);