ubus_monitor: workaround possibly false positive uses of memory after it is freed
[project/ubus.git] / ubusd_monitor.c
index 501e06d0716c56227462b64c8941769af3f63071..bba741e86987172197583331f13d8cc10e09036c 100644 (file)
@@ -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;
 }