From ff258d7afb5feaf60e537ec647a1835f18bb8a1f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 26 Mar 2009 10:13:50 +0100 Subject: [PATCH] Avahi disables a timer by tv=NULL in avahi_timeout_update(), do not crash (cherry picked from commit 57301725e1c92676d3dbb62c81a41507ed1adb7b) --- source/lib/avahi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/lib/avahi.c b/source/lib/avahi.c index bdc58cb8145..b30ef0627eb 100644 --- a/source/lib/avahi.c +++ b/source/lib/avahi.c @@ -216,6 +216,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 = event_add_timed(t->ctx->ev, t, *tv, avahi_timeout_handler, t); /* * No failure mode defined here -- 2.11.4.GIT