From 5efd2b2fa7bf61dfb6edb1b7f142b8d3c7641ed2 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 18 Dec 2008 04:47:24 +0000 Subject: [PATCH] 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 --- src/or/dirserv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);