]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Avahi disables a timer by tv=NULL in avahi_timeout_update(), do not crash
authorVolker Lendecke <vl@samba.org>
Thu, 26 Mar 2009 09:13:50 +0000 (10:13 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 26 Mar 2009 09:14:24 +0000 (10:14 +0100)
source/lib/avahi.c

index bdc58cb8145d5eeb6162124c20d7d8cd241292e0..b30ef0627eba807e009352e9a3eef6d32cf4a016 100644 (file)
@@ -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