From a20a710c944055932402ec5dfe3a36ac3d654cbf Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 26 Mar 2009 10:03:59 +0100 Subject: Avahi disables a timer by tv=NULL in avahi_timeout_update(), do not crash --- source3/lib/avahi.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3') diff --git a/source3/lib/avahi.c b/source3/lib/avahi.c index ac9867a1fc..269b329e64 100644 --- a/source3/lib/avahi.c +++ b/source3/lib/avahi.c @@ -207,6 +207,13 @@ static void avahi_timeout_update(AvahiTimeout *t, const struct timeval *tv) { TALLOC_FREE(t->te); + if (tv == NULL) { + /* + * Disable this timer + */ + return; + } + t->te = tevent_add_timer(t->ctx->ev, t, *tv, avahi_timeout_handler, t); /* * No failure mode defined here -- cgit