projects
/
project
/
ubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dac6c7c
)
ubus_monitor: workaround possibly false positive uses of memory after it is freed
author
Petr Štetiar
<ynezz@true.cz>
Thu, 19 Dec 2019 09:48:57 +0000
(10:48 +0100)
committer
Petr Štetiar
<ynezz@true.cz>
Thu, 19 Dec 2019 18:53:25 +0000
(19:53 +0100)
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>
ubusd_monitor.c
patch
|
blob
|
history
diff --git
a/ubusd_monitor.c
b/ubusd_monitor.c
index 501e06d0716c56227462b64c8941769af3f63071..bba741e86987172197583331f13d8cc10e09036c 100644
(file)
--- 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;
}