Browse Source

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.

svn:r17668
Nick Mathewson 15 years ago
parent
commit
f3f6daf819
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/or/dirserv.c

+ 2 - 1
src/or/dirserv.c

@@ -726,7 +726,8 @@ dirserv_add_descriptor(routerinfo_t *ri, const char **msg)
     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);