summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-18 04:47:24 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-18 04:47:24 +0000
commit5efd2b2fa7bf61dfb6edb1b7f142b8d3c7641ed2 (patch)
treecde83cabc1b4b1d79f181371558e589036de49f8
parenteb1752e458961946fa49f01edd0e8cac82a5fc75 (diff)
downloadtor-5efd2b2fa7bf61dfb6edb1b7f142b8d3c7641ed2.tar.gz
tor-5efd2b2fa7bf61dfb6edb1b7f142b8d3c7641ed2.zip
Backport: 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:r17670
-rw-r--r--src/or/dirserv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index b6a47411b2..655117ee70 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -702,7 +702,8 @@ dirserv_add_descriptor(routerinfo_t *ri, const char **msg)
return r == -1 ? 0 : -1;
} 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);