summaryrefslogtreecommitdiff
path: root/source3/lib/avahi.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-03-26 10:03:59 +0100
committerVolker Lendecke <vl@samba.org>2009-03-26 10:05:27 +0100
commita20a710c944055932402ec5dfe3a36ac3d654cbf (patch)
treec67dca222af29181c5652ce5a840a7ac4d78546c /source3/lib/avahi.c
parent202228d48b6459148d328840d23322ecfac00626 (diff)
downloadsamba-a20a710c944055932402ec5dfe3a36ac3d654cbf.tar.gz
samba-a20a710c944055932402ec5dfe3a36ac3d654cbf.tar.bz2
samba-a20a710c944055932402ec5dfe3a36ac3d654cbf.zip
Avahi disables a timer by tv=NULL in avahi_timeout_update(), do not crash
Diffstat (limited to 'source3/lib/avahi.c')
-rw-r--r--source3/lib/avahi.c7
1 files changed, 7 insertions, 0 deletions
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