parent
f0970dc8bf
commit
ab490ab46c
@ -0,0 +1,28 @@
|
|||||||
|
From bbf47e831143dc87c90811f404ccbae580930ff0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gustavo Noronha Silva <gustavo@noronha.dev.br>
|
||||||
|
Date: Sun, 2 Jan 2022 22:29:04 -0300
|
||||||
|
Subject: [PATCH] Do not disable timeout cleanup on watch cleanup
|
||||||
|
|
||||||
|
This was causing timeouts to never be removed from the linked list that
|
||||||
|
tracks them, resulting in both memory and CPU usage to grow larger over
|
||||||
|
time.
|
||||||
|
---
|
||||||
|
avahi-common/simple-watch.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/avahi-common/simple-watch.c b/avahi-common/simple-watch.c
|
||||||
|
index 08d8090..2a4a989 100644
|
||||||
|
--- a/avahi-common/simple-watch.c
|
||||||
|
+++ b/avahi-common/simple-watch.c
|
||||||
|
@@ -238,7 +238,7 @@ static void cleanup_watches(AvahiSimplePoll *s, int all) {
|
||||||
|
destroy_watch(w);
|
||||||
|
}
|
||||||
|
|
||||||
|
- s->timeout_req_cleanup = 0;
|
||||||
|
+ s->watch_req_cleanup = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static AvahiTimeout* timeout_new(const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCallback callback, void *userdata) {
|
||||||
|
--
|
||||||
|
2.45.2
|
||||||
|
|
@ -0,0 +1,24 @@
|
|||||||
|
From 93de55227583a149a375f529f3fafafae7c2c3bb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wei Li <wei.li@calix.com>
|
||||||
|
Date: Fri, 23 Dec 2022 17:02:53 +0800
|
||||||
|
Subject: [PATCH] fix memory leak in wide area lookup
|
||||||
|
|
||||||
|
---
|
||||||
|
avahi-core/wide-area.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/avahi-core/wide-area.c b/avahi-core/wide-area.c
|
||||||
|
index d5e64e5..971f5e7 100644
|
||||||
|
--- a/avahi-core/wide-area.c
|
||||||
|
+++ b/avahi-core/wide-area.c
|
||||||
|
@@ -564,6 +564,7 @@ static void socket_event(AVAHI_GCC_UNUSED AvahiWatch *w, int fd, AVAHI_GCC_UNUSE
|
||||||
|
if (p) {
|
||||||
|
handle_packet(e, p);
|
||||||
|
avahi_dns_packet_free(p);
|
||||||
|
+ avahi_cleanup_dead_entries(e->server);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.45.2
|
||||||
|
|
Loading…
Reference in new issue