avahi: Import patches for security fixes
[feed/packages.git] / libs / avahi / patches / 203-Do-not-disable-timeout-cleanup-on-watch-cleanup.patch
1 From: Gustavo Noronha Silva <gustavo@noronha.dev.br>
2 Date: Sun, 2 Jan 2022 22:29:04 -0300
3 Subject: Do not disable timeout cleanup on watch cleanup
4
5 This was causing timeouts to never be removed from the linked list that
6 tracks them, resulting in both memory and CPU usage to grow larger over
7 time.
8 ---
9 avahi-common/simple-watch.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12 --- a/avahi-common/simple-watch.c
13 +++ b/avahi-common/simple-watch.c
14 @@ -238,7 +238,7 @@ static void cleanup_watches(AvahiSimpleP
15 destroy_watch(w);
16 }
17
18 - s->timeout_req_cleanup = 0;
19 + s->watch_req_cleanup = 0;
20 }
21
22 static AvahiTimeout* timeout_new(const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCallback callback, void *userdata) {