mirror of
https://gitlab.com/prpl-foundation/prplos/feeds/feed-prpl.git
synced 2025-12-20 01:00:26 +08:00
PROVISORY: ambiorix: libamxrt: PCF-1080: fix memory leak in tr181-device
None-expired timers that are deleted stay in the list, normally removed from memory as soon as SIGALRM happens. Force garbage collection of deleted timers. This fix is provided with libamxrt v0.5.2 but it has a lot of dependencies. Let's backport the fix until libamxrt v0.5.2 gets merged. Closes: PCF-1080 Signed-off-by: Yüce Kürüm <yuce.kurum@mind.be> Signed-off-by: Yüce Kürüm <yuce.kurum_ext@softathome.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
Index: libamxrt-v0.3.6/src/amxrt_el_libevent.c
|
||||
===================================================================
|
||||
--- libamxrt-v0.3.6.orig/src/amxrt_el_libevent.c
|
||||
+++ libamxrt-v0.3.6/src/amxrt_el_libevent.c
|
||||
@@ -114,6 +114,7 @@ static void amxrt_el_connection_read_cb(
|
||||
void* arg) {
|
||||
amxp_connection_t* con = (amxp_connection_t*) arg;
|
||||
con->reader(fd, con->priv);
|
||||
+ amxp_timers_check();
|
||||
}
|
||||
|
||||
static void amxrt_el_connection_can_write_cb(UNUSED evutil_socket_t fd,
|
||||
@@ -135,6 +136,7 @@ static void amxrt_el_amxp_signal_read_cb
|
||||
UNUSED short flags,
|
||||
UNUSED void* arg) {
|
||||
amxp_signal_read();
|
||||
+ amxp_timers_check();
|
||||
}
|
||||
|
||||
static void amxrt_el_amxp_syssignal_read_cb(UNUSED evutil_socket_t fd,
|
||||
Reference in New Issue
Block a user