summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-12-19 10:48:57 +0100
committerPetr Štetiar <ynezz@true.cz>2019-12-19 19:53:25 +0100
commitc60583743ccf105f5d70270b437d2f7636d21193 (patch)
treebb51dc0306e38b5be30ab1f9d3fad7905bf89dca
parentdac6c7c575ac2f8f04706a137e703deffbf88aa7 (diff)
downloadubus-c60583743ccf105f5d70270b437d2f7636d21193.tar.gz
ubus_monitor: workaround possibly false positive uses of memory after it is freed
scan-build from clang-9 has reported following: libubox/list.h:141:2: warning: Use of memory after it is freed _list_add(_new, head, head->next); Signed-off-by: Petr Štetiar <ynezz@true.cz>
-rw-r--r--ubusd_monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ubusd_monitor.c b/ubusd_monitor.c
index 501e06d..bba741e 100644
--- a/ubusd_monitor.c
+++ b/ubusd_monitor.c
@@ -41,7 +41,7 @@ ubusd_monitor_connect(struct ubus_client *cl, struct ubus_msg_buf *ub)
return false;
m->cl = cl;
- list_add(&m->list, &monitors);
+ list_add_tail(&m->list, &monitors);
return true;
}