Explorar el Código

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 hace 17 años
padre
commit
f3f6daf819
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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);
     tor_free(desc);
   } else {
   } else {
     smartlist_t *changed;
     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();
     changed = smartlist_create();
     smartlist_add(changed, ri);
     smartlist_add(changed, ri);