when using rpcd and updating config files using the ubus interface there is a memory leak in procd.

here is a script that shows the error.


------------
#!/bin/sh

touch /etc/config/playapp

while true
do
    ubus call uci add '{"config":"playapp","type":"blabla"}'
    ubus call uci commit '{"config":"playapp"}'
    ps | grep procd|grep -v grep
done
------------

the issue happens in libubusbox function json_script_get_file() that recreates a new json_script_file all the time.

json_script_get_file() end up calling rule_load_script() in procd (system/trigger.c) and that do the allocation.
then json_script_get_file adds it to a avl tree.

but its done over and over every call.

not sure what the solution is here. where is the deallocation supposed to happen?
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to